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>
This commit is contained in:
parent
1edba6484b
commit
621fa19a24
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue