diff options
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index 71ba2a774197..67fc09a57f26 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -802,7 +802,7 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev) guard(srcu)(&gdev->srcu); chip = srcu_dereference(gdev->chip, &gdev->srcu); - if (chip) + if (!chip) return; /* unregister gpiod class devices owned by sysfs */ |