From: Markus Elfring <elfr...@users.sourceforge.net>
Date: Sun, 25 Dec 2016 16:00:17 +0100

Use the return code "-ENOMEM" (instead of "-EINVAL") after a call of
the function "kzalloc" failed here.

Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net>
---
 drivers/media/usb/uvc/uvc_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c 
b/drivers/media/usb/uvc/uvc_driver.c
index b0833902fde2..5736f8b26f92 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -663,7 +663,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
        streaming = kzalloc(sizeof(*streaming), GFP_KERNEL);
        if (!streaming) {
                usb_driver_release_interface(&uvc_driver.driver, intf);
-               return -EINVAL;
+               return -ENOMEM;
        }
 
        mutex_init(&streaming->mutex);
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to