diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-24 19:00:58 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-26 02:46:04 -0500 |
commit | 0990a97a1fc649bf9a7e6057c326a835d1520847 (patch) | |
tree | bec29512e921714064dd81bb187bf5d94e09b181 /drivers/media | |
parent | 0df4d6e5bd008a94f1527aa751bbcf7160257c1d (diff) |
lirc: get rid of bogus checks
file argument is a struct file being passed to ->open() or
already opened; none of the checks in lirc_get_pdata()
can fail.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 35002367485c..5247d94fea29 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c | |||
@@ -752,16 +752,7 @@ EXPORT_SYMBOL(lirc_dev_fop_read); | |||
752 | 752 | ||
753 | void *lirc_get_pdata(struct file *file) | 753 | void *lirc_get_pdata(struct file *file) |
754 | { | 754 | { |
755 | void *data = NULL; | 755 | return irctls[iminor(file_inode(file))]->d.data; |
756 | |||
757 | if (file && file->f_dentry && file_inode(file) && | ||
758 | file_inode(file)->i_rdev) { | ||
759 | struct irctl *ir; | ||
760 | ir = irctls[iminor(file_inode(file))]; | ||
761 | data = ir->d.data; | ||
762 | } | ||
763 | |||
764 | return data; | ||
765 | } | 756 | } |
766 | EXPORT_SYMBOL(lirc_get_pdata); | 757 | EXPORT_SYMBOL(lirc_get_pdata); |
767 | 758 | ||