summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655
diff options
context:
space:
mode:
authorDevendra Naga2013-01-08 18:52:32 +0100
committerGreg Kroah-Hartman2013-01-17 22:17:03 +0100
commitb5b384b7277aa01b839850fb4092fd247c2bae98 (patch)
tree9bb96b712b9bc175fcd1a167c9e61b196e203e57 /drivers/staging/vt6655
parentstaging: zsmalloc: comment zs_create_pool function (diff)
downloadkernel-qcow2-linux-b5b384b7277aa01b839850fb4092fd247c2bae98.tar.gz
kernel-qcow2-linux-b5b384b7277aa01b839850fb4092fd247c2bae98.tar.xz
kernel-qcow2-linux-b5b384b7277aa01b839850fb4092fd247c2bae98.zip
staging: vt6655: s/kmalloc + memset/kzalloc in alloc_rd_info
replace kmalloc and memset if the pointer is valid with kzalloc, and remove the check around the null pointer cases as we dont need it. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r--drivers/staging/vt6655/device.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index e54e00bc5665..1a077f9ea2a1 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -882,14 +882,7 @@ inline static bool device_get_ip(PSDevice pInfo) {
static inline PDEVICE_RD_INFO alloc_rd_info(void) {
- PDEVICE_RD_INFO ptr;
- ptr = (PDEVICE_RD_INFO)kmalloc((int)sizeof(DEVICE_RD_INFO), (int)GFP_ATOMIC);
- if (ptr == NULL)
- return NULL;
- else {
- memset(ptr,0,sizeof(DEVICE_RD_INFO));
- return ptr;
- }
+ return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
}
static inline PDEVICE_TD_INFO alloc_td_info(void) {