Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0990a97a authored by Al Viro's avatar Al Viro
Browse files

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0df4d6e5
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -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);