Staging: bcm: Bcmchar: Fix style issues on bcm_char_release()

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Javier Martinez Canillas 2011-02-12 04:38:23 +01:00 committed by Greg Kroah-Hartman
parent 1e1233234e
commit a7d3976edc

View file

@ -51,9 +51,9 @@ static int bcm_char_release(struct inode *inode, struct file *filp)
pTarang = (PPER_TARANG_DATA)filp->private_data;
if(pTarang == NULL)
{
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "ptarang is null\n");
if (pTarang == NULL) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
"ptarang is null\n");
return 0;
}
@ -62,29 +62,23 @@ static int bcm_char_release(struct inode *inode, struct file *filp)
down(&Adapter->RxAppControlQueuelock);
tmp = Adapter->pTarangs;
for ( ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next )
{
for (ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next) {
if (tmp == pTarang)
break;
}
if ( tmp )
{
if (tmp) {
if (!ptmp)
Adapter->pTarangs = tmp->next;
else
ptmp->next = tmp->next;
}
else
{
} else {
up(&Adapter->RxAppControlQueuelock);
return 0;
}
pkt = pTarang->RxAppControlHead;
while ( pkt )
{
while (pkt) {
npkt = pkt->next;
kfree_skb(pkt);
pkt = npkt;