Skip to content

Commit

Permalink
staging: vt6655: s/kmalloc + memset / kzalloc
Browse files Browse the repository at this point in the history
replace kmalloc and subsequent memset with kzalloc
and drop the null checks and casts and clean the coding style a bit too

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Jan 17, 2013
1 parent 8473f65 commit d1b46e7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/staging/vt6655/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,15 +886,9 @@ static inline PDEVICE_RD_INFO alloc_rd_info(void)
return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
}

static inline PDEVICE_TD_INFO alloc_td_info(void) {
PDEVICE_TD_INFO ptr;
ptr = (PDEVICE_TD_INFO)kmalloc((int)sizeof(DEVICE_TD_INFO), (int)GFP_ATOMIC);
if (ptr == NULL)
return NULL;
else {
memset(ptr,0,sizeof(DEVICE_TD_INFO));
return ptr;
}
static inline PDEVICE_TD_INFO alloc_td_info(void)
{
return kzalloc(sizeof(DEVICE_TD_INFO), GFP_ATOMIC);
}

/*--------------------- Export Functions --------------------------*/
Expand Down

0 comments on commit d1b46e7

Please sign in to comment.