aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:05 -0500
commit6044ec8882c726e325017bd948aa0cd94ad33abc (patch)
tree3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/sbus
parent2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff)
[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>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/envctrl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index b0cc3c2588fd..ba56762b05f6 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1125,10 +1125,9 @@ out_deregister:
1125 misc_deregister(&envctrl_dev); 1125 misc_deregister(&envctrl_dev);
1126out_iounmap: 1126out_iounmap:
1127 iounmap(i2c); 1127 iounmap(i2c);
1128 for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++) { 1128 for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++)
1129 if (i2c_childlist[i].tables) 1129 kfree(i2c_childlist[i].tables);
1130 kfree(i2c_childlist[i].tables); 1130
1131 }
1132 return err; 1131 return err;
1133} 1132}
1134 1133
@@ -1141,10 +1140,8 @@ static void __exit envctrl_cleanup(void)
1141 iounmap(i2c); 1140 iounmap(i2c);
1142 misc_deregister(&envctrl_dev); 1141 misc_deregister(&envctrl_dev);
1143 1142
1144 for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++) { 1143 for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++)
1145 if (i2c_childlist[i].tables) 1144 kfree(i2c_childlist[i].tables);
1146 kfree(i2c_childlist[i].tables);
1147 }
1148} 1145}
1149 1146
1150module_init(envctrl_init); 1147module_init(envctrl_init);