mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 15:43:08 -04:00
gpio: cdev: Drop redundant nonseekable_open() return check
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> Link: https://patch.msgid.link/20260703020947.8010-1-phucduc.bui@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
83957567b1
commit
44d75ed98d
@@ -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 nonseekable_open(inode, file);
|
||||
|
||||
return ret;
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user