The logic is inverted, we want to return if the chip *IS* NULL.
Unified · Split
| @@ -802,7 +802,7 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev) · 801 unmodified lines | |||
| 802 | guard(srcu)(&gdev->srcu); | 802 | guard(srcu)(&gdev->srcu); |
| 803 | 803 | ||
| 804 | chip = srcu_dereference(gdev->chip, &gdev->srcu); | 804 | chip = srcu_dereference(gdev->chip, &gdev->srcu); |
| 805 | if (chip) | 805 | if (!chip) |
| 806 | return; | 806 | return; |
| 807 | 807 | ||
| 808 | /* unregister gpiod class devices owned by sysfs */ | 808 | /* unregister gpiod class devices owned by sysfs */ |