diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2016-07-06 12:01:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-13 21:24:28 +0300 |
commit | 14db9fc2d4e50d95d7586bc6c54029afbcbdf4a1 (patch) | |
tree | eee221d0defad704cde7d552c5e14ca7f9dfcaf1 /drivers/media/rc/lirc_dev.c | |
parent | 6ab86d2aa04375167c0e168eecb672acaf3d991a (diff) | |
download | linux-14db9fc2d4e50d95d7586bc6c54029afbcbdf4a1.tar.xz |
[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: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index a8a5116d9669..71ff82028c80 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -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); |