summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorJavier Martinez Canillas <martinez.javier@gmail.com>2011-02-12 04:38:23 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 13:21:55 -0800
commita7d3976edc32e6041f9d68c79ba64a17d5ec5095 (patch)
treed232bd8550d11668fa365c4b8c68732af81f6199 /drivers/staging/bcm
parent1e1233234edeacabbcaab9d086474224ba5af015 (diff)
downloadblackbird-op-linux-a7d3976edc32e6041f9d68c79ba64a17d5ec5095.tar.gz
blackbird-op-linux-a7d3976edc32e6041f9d68c79ba64a17d5ec5095.zip
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>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/Bcmchar.c68
1 files changed, 31 insertions, 37 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index edcd0c02eb85..2a3f64ccefec 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -45,61 +45,55 @@ static int bcm_char_open(struct inode *inode, struct file * filp)
static int bcm_char_release(struct inode *inode, struct file *filp)
{
- PPER_TARANG_DATA pTarang, tmp, ptmp;
- PMINI_ADAPTER Adapter=NULL;
- struct sk_buff * pkt, * npkt;
+ PPER_TARANG_DATA pTarang, tmp, ptmp;
+ PMINI_ADAPTER Adapter = NULL;
+ struct sk_buff *pkt, *npkt;
- pTarang = (PPER_TARANG_DATA)filp->private_data;
+ pTarang = (PPER_TARANG_DATA)filp->private_data;
- if(pTarang == NULL)
- {
- BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "ptarang is null\n");
- return 0;
+ if (pTarang == NULL) {
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+ "ptarang is null\n");
+ return 0;
}
Adapter = pTarang->Adapter;
- down( &Adapter->RxAppControlQueuelock);
+ down(&Adapter->RxAppControlQueuelock);
- tmp = Adapter->pTarangs;
- for ( ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next )
- {
- if ( tmp == pTarang )
+ tmp = Adapter->pTarangs;
+ for (ptmp = NULL; tmp; ptmp = tmp, tmp = tmp->next) {
+ if (tmp == pTarang)
break;
}
- if ( tmp )
- {
- if ( !ptmp )
- Adapter->pTarangs = tmp->next;
- else
- ptmp->next = tmp->next;
+ if (tmp) {
+ if (!ptmp)
+ Adapter->pTarangs = tmp->next;
+ else
+ ptmp->next = tmp->next;
+ } else {
+ up(&Adapter->RxAppControlQueuelock);
+ return 0;
}
- else
- {
- up( &Adapter->RxAppControlQueuelock);
- return 0;
- }
-
- pkt = pTarang->RxAppControlHead;
- while ( pkt )
- {
- npkt = pkt->next;
- kfree_skb(pkt);
- pkt = npkt;
+ pkt = pTarang->RxAppControlHead;
+ while (pkt) {
+ npkt = pkt->next;
+ kfree_skb(pkt);
+ pkt = npkt;
}
- up( &Adapter->RxAppControlQueuelock);
+ up(&Adapter->RxAppControlQueuelock);
- /*Stop Queuing the control response Packets*/
- atomic_dec(&Adapter->ApplicationRunning);
+ /*Stop Queuing the control response Packets*/
+ atomic_dec(&Adapter->ApplicationRunning);
- kfree(pTarang);
+ kfree(pTarang);
/* remove this filp from the asynchronously notified filp's */
- filp->private_data = NULL;
- return 0;
+ filp->private_data = NULL;
+ return 0;
}
static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size, loff_t *f_pos)
OpenPOWER on IntegriCloud