Commit a99e334d authored by Madhusudhanan Ravindran's avatar Madhusudhanan Ravindran Committed by Greg Kroah-Hartman

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: default avatarMadhusudhanan Ravindran <mravindran04@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0fa96e39
...@@ -1278,11 +1278,10 @@ static int __init lynxfb_setup(char * options) ...@@ -1278,11 +1278,10 @@ static int __init lynxfb_setup(char * options)
pr_info("options:%s\n",options); pr_info("options:%s\n",options);
len = strlen(options) + 1; len = strlen(options) + 1;
g_settings = kmalloc(len,GFP_KERNEL); g_settings = kzalloc(len, GFP_KERNEL);
if(!g_settings) if(!g_settings)
return -ENOMEM; return -ENOMEM;
memset(g_settings,0,len);
tmp = g_settings; tmp = g_settings;
/* Notes: /* Notes:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment