[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cca09ee1-dc30-b3e6-41fb-63c1443bf91b@users.sourceforge.net>
Date: Sun, 25 Dec 2016 19:41:41 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-media@...r.kernel.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 10/19] [media] uvc_driver: Return -ENOMEM after a failed
kzalloc() call in uvc_parse_streaming()
From: Markus Elfring <elfring@...rs.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 <elfring@...rs.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
Powered by blists - more mailing lists