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
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 */

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