summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-16 07:37:51 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 18:35:28 +0300
commit621fa19a2485ca6f4612b3c044766bc173551d76 (patch)
tree6ad90039aa73eab8375bd2547ab722d1748a875b
parent1edba6484b19d288e11722d72b55a4b919fb059e (diff)
downloadlinux-621fa19a2485ca6f4612b3c044766bc173551d76.tar.xz
media: winbond-cir: Fix pnp_irq's error checking for wbcir_probe
The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/rc/winbond-cir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 3ca7ab48293d..0adf0991f5ab 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -1044,7 +1044,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
data->irq = pnp_irq(device, 0);
if (data->wbase == 0 || data->ebase == 0 ||
- data->sbase == 0 || data->irq == 0) {
+ data->sbase == 0 || data->irq == -1) {
err = -ENODEV;
dev_err(dev, "Invalid resources\n");
goto exit_free_data;