diff options
author | David Härdeman <david@hardeman.nu> | 2017-06-25 15:31:19 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2017-10-04 19:49:49 +0300 |
commit | de226ec8a6ac10e65fcc689a28761c966986e6a6 (patch) | |
tree | 1157167611d07225512ac170a3cb22b470b9ee42 /drivers/media/rc/lirc_dev.c | |
parent | cf09e3c904bf424f8b6a8203958e09bf7d9bcbc0 (diff) | |
download | linux-de226ec8a6ac10e65fcc689a28761c966986e6a6.tar.xz |
[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>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 9080e39ea391..5e3c4779d866 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -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); |