Commit a7d3976e authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Greg Kroah-Hartman

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

Signed-off-by: default avatarJavier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1e123323
...@@ -46,51 +46,45 @@ static int bcm_char_open(struct inode *inode, struct file * filp) ...@@ -46,51 +46,45 @@ static int bcm_char_open(struct inode *inode, struct file * filp)
static int bcm_char_release(struct inode *inode, struct file *filp) static int bcm_char_release(struct inode *inode, struct file *filp)
{ {
PPER_TARANG_DATA pTarang, tmp, ptmp; PPER_TARANG_DATA pTarang, tmp, ptmp;
PMINI_ADAPTER Adapter=NULL; PMINI_ADAPTER Adapter = NULL;
struct sk_buff * pkt, * npkt; struct sk_buff *pkt, *npkt;
pTarang = (PPER_TARANG_DATA)filp->private_data; pTarang = (PPER_TARANG_DATA)filp->private_data;
if(pTarang == NULL) if (pTarang == NULL) {
{ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "ptarang is null\n"); "ptarang is null\n");
return 0; return 0;
} }
Adapter = pTarang->Adapter; Adapter = pTarang->Adapter;
down( &Adapter->RxAppControlQueuelock); down(&Adapter->RxAppControlQueuelock);
tmp = Adapter->pTarangs; tmp = Adapter->pTarangs;
for ( ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next ) for (ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next) {
{ if (tmp == pTarang)
if ( tmp == pTarang )
break; break;
} }
if ( tmp ) if (tmp) {
{ if (!ptmp)
if ( !ptmp )
Adapter->pTarangs = tmp->next; Adapter->pTarangs = tmp->next;
else else
ptmp->next = tmp->next; ptmp->next = tmp->next;
} } else {
up(&Adapter->RxAppControlQueuelock);
else
{
up( &Adapter->RxAppControlQueuelock);
return 0; return 0;
} }
pkt = pTarang->RxAppControlHead; pkt = pTarang->RxAppControlHead;
while ( pkt ) while (pkt) {
{
npkt = pkt->next; npkt = pkt->next;
kfree_skb(pkt); kfree_skb(pkt);
pkt = npkt; pkt = npkt;
} }
up( &Adapter->RxAppControlQueuelock); up(&Adapter->RxAppControlQueuelock);
/*Stop Queuing the control response Packets*/ /*Stop Queuing the control response Packets*/
atomic_dec(&Adapter->ApplicationRunning); atomic_dec(&Adapter->ApplicationRunning);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment