Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:
"Two fixes for the GPIO subsystem. Both address issues in the core GPIO
code:

- fix the return value in error path in gpiolib_dev_init()

- fix the 'gpio-line-names' property handling correctly this time"

* tag 'gpio-fixes-for-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpiolib: Assign fwnode to parent's if no primary one provided
gpiolib: Fix error return code in gpiolib_dev_init()

+9 -1
+9 -1
drivers/gpio/gpiolib.c
··· 571 571 struct lock_class_key *lock_key, 572 572 struct lock_class_key *request_key) 573 573 { 574 + struct fwnode_handle *fwnode = gc->parent ? dev_fwnode(gc->parent) : NULL; 574 575 unsigned long flags; 575 576 int ret = 0; 576 577 unsigned i; ··· 594 593 } 595 594 596 595 of_gpio_dev_init(gc, gdev); 596 + 597 + /* 598 + * Assign fwnode depending on the result of the previous calls, 599 + * if none of them succeed, assign it to the parent's one. 600 + */ 601 + gdev->dev.fwnode = dev_fwnode(&gdev->dev) ?: fwnode; 597 602 598 603 gdev->id = ida_alloc(&gpio_ida, GFP_KERNEL); 599 604 if (gdev->id < 0) { ··· 4263 4256 return ret; 4264 4257 } 4265 4258 4266 - if (driver_register(&gpio_stub_drv) < 0) { 4259 + ret = driver_register(&gpio_stub_drv); 4260 + if (ret < 0) { 4267 4261 pr_err("gpiolib: could not register GPIO stub driver\n"); 4268 4262 bus_unregister(&gpio_bus_type); 4269 4263 return ret;