mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: [media] media: lirc_dev: clarify error handling
If an error is generated, it is more logical to error out ASAP.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
(cherry picked from commit de226ec8a6)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
00615701b5
commit
e152352354
@@ -292,7 +292,7 @@ EXPORT_SYMBOL(lirc_unregister_driver);
|
||||
int lirc_dev_fop_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct irctl *ir;
|
||||
int retval = 0;
|
||||
int retval;
|
||||
|
||||
if (iminor(inode) >= MAX_IRCTL_DEVICES) {
|
||||
pr_err("open result for %d is -ENODEV\n", iminor(inode));
|
||||
@@ -333,9 +333,11 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
|
||||
|
||||
ir->open++;
|
||||
|
||||
error:
|
||||
nonseekable_open(inode, file);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL(lirc_dev_fop_open);
|
||||
|
||||
Reference in New Issue
Block a user