[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 <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
2ea7533060
commit
6044ec8882
@@ -299,10 +299,8 @@ static int w1_f23_add_slave(struct w1_slave *sl)
|
||||
static void w1_f23_remove_slave(struct w1_slave *sl)
|
||||
{
|
||||
#ifdef CONFIG_W1_F23_CRC
|
||||
if (sl->family_data) {
|
||||
kfree(sl->family_data);
|
||||
sl->family_data = NULL;
|
||||
}
|
||||
kfree(sl->family_data);
|
||||
sl->family_data = NULL;
|
||||
#endif /* CONFIG_W1_F23_CRC */
|
||||
sysfs_remove_bin_file(&sl->dev.kobj, &w1_f23_bin_attr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user