Skip to content

Commit

Permalink
Staging: bcm: Bcmchar: Fix style issues on bcm_char_open()
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent ebb61e5 commit 1e12332
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@

static int bcm_char_open(struct inode *inode, struct file * filp)
{
PMINI_ADAPTER Adapter = NULL;
PPER_TARANG_DATA pTarang = NULL;
PMINI_ADAPTER Adapter = NULL;
PPER_TARANG_DATA pTarang = NULL;

Adapter = GET_BCM_ADAPTER(gblpnetdev);
pTarang = (PPER_TARANG_DATA)kmalloc(sizeof(PER_TARANG_DATA), GFP_KERNEL);
if (!pTarang)
return -ENOMEM;
pTarang = (PPER_TARANG_DATA)kmalloc(sizeof(PER_TARANG_DATA),
GFP_KERNEL);
if (!pTarang)
return -ENOMEM;

memset (pTarang, 0, sizeof(PER_TARANG_DATA));
pTarang->Adapter = Adapter;
pTarang->RxCntrlMsgBitMask = 0xFFFFFFFF & ~(1 << 0xB) ;
memset(pTarang, 0, sizeof(PER_TARANG_DATA));
pTarang->Adapter = Adapter;
pTarang->RxCntrlMsgBitMask = 0xFFFFFFFF & ~(1 << 0xB);

down(&Adapter->RxAppControlQueuelock);
pTarang->next = Adapter->pTarangs;
Adapter->pTarangs = pTarang;
pTarang->next = Adapter->pTarangs;
Adapter->pTarangs = pTarang;
up(&Adapter->RxAppControlQueuelock);

/* Store the Adapter structure */
Expand All @@ -41,6 +42,7 @@ static int bcm_char_open(struct inode *inode, struct file * filp)
nonseekable_open(inode, filp);
return 0;
}

static int bcm_char_release(struct inode *inode, struct file *filp)
{
PPER_TARANG_DATA pTarang, tmp, ptmp;
Expand Down

0 comments on commit 1e12332

Please sign in to comment.