Message ID | 20221024134932.2873081-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: uvcvideo: fix return value check in uvc_gpio_parse() | expand |
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 215fb483efb0..1e6bdd6104ef 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1267,7 +1267,7 @@ static int uvc_gpio_parse(struct uvc_device *dev) irq = gpiod_to_irq(gpio_privacy); if (irq < 0) { - if (irq != EPROBE_DEFER) + if (irq != -EPROBE_DEFER) dev_err(&dev->udev->dev, "No IRQ for privacy GPIO (%d)\n", irq); return irq;
gpiod_to_irq() may return -EPROBE_DEFER, add a minus sign to fix it. Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/media/usb/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)