diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/f71805f.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 2fc537819388..7c2973487122 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c | |||
@@ -1290,14 +1290,11 @@ static int __init f71805f_device_add(unsigned short address, | |||
1290 | if (err) { | 1290 | if (err) { |
1291 | printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | 1291 | printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", |
1292 | err); | 1292 | err); |
1293 | goto exit_kfree_data; | 1293 | goto exit_device_put; |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | return 0; | 1296 | return 0; |
1297 | 1297 | ||
1298 | exit_kfree_data: | ||
1299 | kfree(pdev->dev.platform_data); | ||
1300 | pdev->dev.platform_data = NULL; | ||
1301 | exit_device_put: | 1298 | exit_device_put: |
1302 | platform_device_put(pdev); | 1299 | platform_device_put(pdev); |
1303 | exit: | 1300 | exit: |
@@ -1390,10 +1387,7 @@ exit: | |||
1390 | 1387 | ||
1391 | static void __exit f71805f_exit(void) | 1388 | static void __exit f71805f_exit(void) |
1392 | { | 1389 | { |
1393 | kfree(pdev->dev.platform_data); | ||
1394 | pdev->dev.platform_data = NULL; | ||
1395 | platform_device_unregister(pdev); | 1390 | platform_device_unregister(pdev); |
1396 | |||
1397 | platform_driver_unregister(&f71805f_driver); | 1391 | platform_driver_unregister(&f71805f_driver); |
1398 | } | 1392 | } |
1399 | 1393 | ||