From: Al Viro Date: Fri, 25 Jan 2013 00:00:58 +0000 (-0500) Subject: lirc: get rid of bogus checks X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0990a97a1fc649bf9a7e6057c326a835d1520847;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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); void *lirc_get_pdata(struct file *file) { - void *data = NULL; - - if (file && file->f_dentry && file_inode(file) && - file_inode(file)->i_rdev) { - struct irctl *ir; - ir = irctls[iminor(file_inode(file))]; - data = ir->d.data; - } - - return data; + return irctls[iminor(file_inode(file))]->d.data; } EXPORT_SYMBOL(lirc_get_pdata);