Commit 621fa19a authored by Arvind Yadav's avatar Arvind Yadav Committed by Mauro Carvalho Chehab

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 1edba648
...@@ -1044,7 +1044,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) ...@@ -1044,7 +1044,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
data->irq = pnp_irq(device, 0); data->irq = pnp_irq(device, 0);
if (data->wbase == 0 || data->ebase == 0 || if (data->wbase == 0 || data->ebase == 0 ||
data->sbase == 0 || data->irq == 0) { data->sbase == 0 || data->irq == -1) {
err = -ENODEV; err = -ENODEV;
dev_err(dev, "Invalid resources\n"); dev_err(dev, "Invalid resources\n");
goto exit_free_data; goto exit_free_data;
......
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