diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/envctrl.c | 13 |
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); |
1126 | out_iounmap: | 1126 | out_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 | ||
1150 | module_init(envctrl_init); | 1147 | module_init(envctrl_init); |