History

gpio: sysfs: fix inverted pointer logic

The logic is inverted, we want to return if the chip *IS* NULL.

Bartosz Golaszewski committed 2 years ago

Commit be91c191 parent 0d7fa0e1 file · +1 −1Browse files

Unified · Split

drivers/gpio/gpiolib-sysfs.c+1−1
@@ -802,7 +802,7 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev) · 801 unmodified lines
802802 guard(srcu)(&gdev->srcu);
803803
804804 chip = srcu_dereference(gdev->chip, &gdev->srcu);
805− if (chip)
805+ if (!chip)
806806 return;
807807
808808 /* unregister gpiod class devices owned by sysfs */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t