From: Madhusudhanan Ravindran Date: Tue, 10 Mar 2015 17:37:39 +0000 (+0530) Subject: staging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a99e334da16ce81163db0e47ec22469a79a91b72;p=openwrt%2Fstaging%2Fblogic.git staging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0 The semantic patch that makes this change is available in scriptcoccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Madhusudhanan Ravindran Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 5532a28e6030..aa0888c232b9 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1278,11 +1278,10 @@ static int __init lynxfb_setup(char * options) pr_info("options:%s\n",options); len = strlen(options) + 1; - g_settings = kmalloc(len,GFP_KERNEL); + g_settings = kzalloc(len, GFP_KERNEL); if(!g_settings) return -ENOMEM; - memset(g_settings,0,len); tmp = g_settings; /* Notes: