* [PATCH] gpio: cdev: Drop redundant nonseekable_open() return check
@ 2026-07-03 2:09 phucduc.bui
2026-07-06 9:03 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-07-03 2:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Kent Gibson
Cc: Linus Walleij, linux-gpio, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
nonseekable_open() never fails, so the error check is unnecessary.
Remove the dead error handling path.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/gpio/gpiolib-cdev.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 82f27db0b230..9f3b628d5793 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -2682,15 +2682,8 @@ static int gpio_chrdev_open(struct inode *inode, struct file *file)
file->private_data = cdev;
cdev->fp = file;
- ret = nonseekable_open(inode, file);
- if (ret)
- goto out_unregister_device_notifier;
-
- return ret;
+ return nonseekable_open(inode, file);
-out_unregister_device_notifier:
- blocking_notifier_chain_unregister(&gdev->device_notifier,
- &cdev->device_unregistered_nb);
out_unregister_line_notifier:
scoped_guard(write_lock_irqsave, &gdev->line_state_lock)
raw_notifier_chain_unregister(&gdev->line_state_notifier,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: cdev: Drop redundant nonseekable_open() return check
2026-07-03 2:09 [PATCH] gpio: cdev: Drop redundant nonseekable_open() return check phucduc.bui
@ 2026-07-06 9:03 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-07-06 9:03 UTC (permalink / raw)
To: Bartosz Golaszewski, Kent Gibson, phucduc.bui
Cc: Bartosz Golaszewski, Linus Walleij, linux-gpio, linux-kernel
On Fri, 03 Jul 2026 09:09:46 +0700, phucduc.bui@gmail.com wrote:
> nonseekable_open() never fails, so the error check is unnecessary.
> Remove the dead error handling path.
>
>
Applied, thanks!
[1/1] gpio: cdev: Drop redundant nonseekable_open() return check
https://git.kernel.org/brgl/c/44d75ed98ddde54edc55e9300bb70ea9a7c62f4b
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-06 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 2:09 [PATCH] gpio: cdev: Drop redundant nonseekable_open() return check phucduc.bui
2026-07-06 9:03 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox