diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/pc8736x_gpio.c | 5 | ||||
-rw-r--r-- | drivers/char/scx200_gpio.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c index 1c706ccfdbb3..c860de6a6fde 100644 --- a/drivers/char/pc8736x_gpio.c +++ b/drivers/char/pc8736x_gpio.c | |||
@@ -319,9 +319,10 @@ static int __init pc8736x_gpio_init(void) | |||
319 | return 0; | 319 | return 0; |
320 | 320 | ||
321 | undo_platform_dev_add: | 321 | undo_platform_dev_add: |
322 | platform_device_put(pdev); | 322 | platform_device_del(pdev); |
323 | undo_platform_dev_alloc: | 323 | undo_platform_dev_alloc: |
324 | kfree(pdev); | 324 | platform_device_put(pdev); |
325 | |||
325 | return rc; | 326 | return rc; |
326 | } | 327 | } |
327 | 328 | ||
diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c index 5a280a330401..45083e5dd23b 100644 --- a/drivers/char/scx200_gpio.c +++ b/drivers/char/scx200_gpio.c | |||
@@ -126,9 +126,10 @@ static int __init scx200_gpio_init(void) | |||
126 | undo_chrdev_region: | 126 | undo_chrdev_region: |
127 | unregister_chrdev_region(dev, num_pins); | 127 | unregister_chrdev_region(dev, num_pins); |
128 | undo_platform_device_add: | 128 | undo_platform_device_add: |
129 | platform_device_put(pdev); | 129 | platform_device_del(pdev); |
130 | undo_malloc: | 130 | undo_malloc: |
131 | kfree(pdev); | 131 | platform_device_put(pdev); |
132 | |||
132 | return rc; | 133 | return rc; |
133 | } | 134 | } |
134 | 135 | ||
@@ -136,7 +137,6 @@ static void __exit scx200_gpio_cleanup(void) | |||
136 | { | 137 | { |
137 | kfree(scx200_devices); | 138 | kfree(scx200_devices); |
138 | unregister_chrdev_region(MKDEV(major, 0), num_pins); | 139 | unregister_chrdev_region(MKDEV(major, 0), num_pins); |
139 | platform_device_put(pdev); | ||
140 | platform_device_unregister(pdev); | 140 | platform_device_unregister(pdev); |
141 | /* kfree(pdev); */ | 141 | /* kfree(pdev); */ |
142 | } | 142 | } |