Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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: