diff options
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index f62aa115d79a..7722ed53bd65 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c | |||
@@ -648,6 +648,7 @@ int gpiod_export_link(struct device *dev, const char *name, | |||
648 | if (tdev != NULL) { | 648 | if (tdev != NULL) { |
649 | status = sysfs_create_link(&dev->kobj, &tdev->kobj, | 649 | status = sysfs_create_link(&dev->kobj, &tdev->kobj, |
650 | name); | 650 | name); |
651 | put_device(tdev); | ||
651 | } else { | 652 | } else { |
652 | status = -ENODEV; | 653 | status = -ENODEV; |
653 | } | 654 | } |
@@ -695,7 +696,7 @@ int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value) | |||
695 | } | 696 | } |
696 | 697 | ||
697 | status = sysfs_set_active_low(desc, dev, value); | 698 | status = sysfs_set_active_low(desc, dev, value); |
698 | 699 | put_device(dev); | |
699 | unlock: | 700 | unlock: |
700 | mutex_unlock(&sysfs_lock); | 701 | mutex_unlock(&sysfs_lock); |
701 | 702 | ||