提交 d1b46e75 编写于 作者: D Devendra Naga 提交者: Greg Kroah-Hartman

staging: vt6655: s/kmalloc + memset / kzalloc

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: NDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8473f654
...@@ -886,15 +886,9 @@ static inline PDEVICE_RD_INFO alloc_rd_info(void) ...@@ -886,15 +886,9 @@ static inline PDEVICE_RD_INFO alloc_rd_info(void)
return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC); return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
} }
static inline PDEVICE_TD_INFO alloc_td_info(void) { 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); return kzalloc(sizeof(DEVICE_TD_INFO), GFP_ATOMIC);
if (ptr == NULL)
return NULL;
else {
memset(ptr,0,sizeof(DEVICE_TD_INFO));
return ptr;
}
} }
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册