summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-class.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 15:16:54 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 15:16:54 -0800
commitd0b00d3fb96d155649f80bf43b81a50ecdd2047f (patch)
treef81385425c625157b6d8f56e5187ac460793e141 /drivers/extcon/extcon-class.c
parent3441cded65118c217a749de4350b6cad50b0e350 (diff)
parent7585ca0dc950583be7fc62099ca43a0c9551a875 (diff)
Merge tag 'extcon-linus-for-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus
Chanwoo writes: Update extcon for 3.13-rc2 This patchset fix NULL pointer error of extcon-arizona driver and fix issue about memory of device groups when calling extcon_dev_unregister function.
Diffstat (limited to 'drivers/extcon/extcon-class.c')
-rw-r--r--drivers/extcon/extcon-class.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
index 15443d3b6be..76322330cbd 100644
--- a/drivers/extcon/extcon-class.c
+++ b/drivers/extcon/extcon-class.c
@@ -792,6 +792,8 @@ void extcon_dev_unregister(struct extcon_dev *edev)
return;
}
+ device_unregister(&edev->dev);
+
if (edev->mutually_exclusive && edev->max_supported) {
for (index = 0; edev->mutually_exclusive[index];
index++)
@@ -812,7 +814,6 @@ void extcon_dev_unregister(struct extcon_dev *edev)
if (switch_class)
class_compat_remove_link(switch_class, &edev->dev, NULL);
#endif
- device_unregister(&edev->dev);
put_device(&edev->dev);
}
EXPORT_SYMBOL_GPL(extcon_dev_unregister);