Commit de226ec8 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab

[media] media: lirc_dev: clarify error handling

If an error is generated, it is more logical to error out ASAP.
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent cf09e3c9
......@@ -286,7 +286,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));
......@@ -327,9 +327,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment