lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: cxt1e1: use kzalloc instead of kmalloc/memset 0
Date

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/cxt1e1/sbecom_inline_linux.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
index ba3ff3e..6dd1b55 100644
--- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
+++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
@@ -46,11 +46,9 @@ void pci_write_32 (u_int32_t *p, u_int32_t v);
static inline void *
OS_kmalloc (size_t size)
{
- char *ptr = kmalloc (size, GFP_KERNEL | GFP_DMA);
+ char *ptr = kzalloc(size, GFP_KERNEL | GFP_DMA);

- if (ptr)
- memset (ptr, 0, size);
- return ptr;
+ return ptr;
}

static inline void
--
1.7.4.4



\
 
 \ /
  Last update: 2014-03-05 16:02    [W:0.160 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site