mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <[email protected]> Acked-by: Aristeu Sergio Rozanski Filho <[email protected]> Acked-by: Roland Dreier <[email protected]> Acked-by: Pierre Ossman <[email protected]> Acked-by: Jean Delvare <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Len Brown <[email protected]> Acked-by: "Antonino A. Daplas" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2ea7533060
commit
6044ec8882
24 changed files with 83 additions and 151 deletions
|
|
@ -1125,10 +1125,9 @@ out_deregister:
|
|||
misc_deregister(&envctrl_dev);
|
||||
out_iounmap:
|
||||
iounmap(i2c);
|
||||
for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++) {
|
||||
if (i2c_childlist[i].tables)
|
||||
kfree(i2c_childlist[i].tables);
|
||||
}
|
||||
for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++)
|
||||
kfree(i2c_childlist[i].tables);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -1141,10 +1140,8 @@ static void __exit envctrl_cleanup(void)
|
|||
iounmap(i2c);
|
||||
misc_deregister(&envctrl_dev);
|
||||
|
||||
for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++) {
|
||||
if (i2c_childlist[i].tables)
|
||||
kfree(i2c_childlist[i].tables);
|
||||
}
|
||||
for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++)
|
||||
kfree(i2c_childlist[i].tables);
|
||||
}
|
||||
|
||||
module_init(envctrl_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue