Commit 14db9fc2 authored by Andi Shyti's avatar Andi Shyti Committed by Mauro Carvalho Chehab

[media] lirc_dev: merge three if statements in only one

The three if statements check the same thing, merge them in only
one statement.
Signed-off-by: default avatarAndi Shyti <andi.shyti@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6ab86d2a
......@@ -270,15 +270,10 @@ static int lirc_allocate_driver(struct lirc_driver *d)
dev_err(d->dev, "add_to_buf not set\n");
return -EBADRQC;
}
} else if (!(d->fops && d->fops->read) && !d->rbuf) {
dev_err(d->dev, "fops->read and rbuf are NULL!\n");
} else if (!d->rbuf && !(d->fops && d->fops->read &&
d->fops->poll && d->fops->unlocked_ioctl)) {
dev_err(d->dev, "undefined read, poll, ioctl\n");
return -EBADRQC;
} else if (!d->rbuf) {
if (!(d->fops && d->fops->read && d->fops->poll &&
d->fops->unlocked_ioctl)) {
dev_err(d->dev, "undefined read, poll, ioctl\n");
return -EBADRQC;
}
}
mutex_lock(&lirc_dev_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment