diff options
author | Madhusudhanan Ravindran <mravindran04@gmail.com> | 2015-03-10 23:07:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-10 21:13:55 +0100 |
commit | a99e334da16ce81163db0e47ec22469a79a91b72 (patch) | |
tree | 16e9554068b1531d00803831c94fc7f86f172d6a /drivers/staging/sm750fb/sm750.c | |
parent | 0fa96e39279988bde14cb6cf6cd0440185f2dae4 (diff) |
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 <mravindran04@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/sm750.c')
-rw-r--r-- | drivers/staging/sm750fb/sm750.c | 3 |
1 files changed, 1 insertions, 2 deletions
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: |