Skip to content

Commit

Permalink
lirc: get rid of bogus checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Feb 26, 2013
1 parent 0df4d6e commit 0990a97
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/media/rc/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0990a97

Please sign in to comment.