[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51554497-b44a-d05d-d32b-02430ee96302@users.sourceforge.net>
Date: Mon, 18 Sep 2017 22:11:30 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-media@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] [media] vicam: Delete an error message for a failed
memory allocation in vicam_dostream()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 18 Sep 2017 21:48:55 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/media/usb/gspca/vicam.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/usb/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c
index 554b90ef2200..15b6887a8e97 100644
--- a/drivers/media/usb/gspca/vicam.c
+++ b/drivers/media/usb/gspca/vicam.c
@@ -183,10 +183,8 @@ static void vicam_dostream(struct work_struct *work)
frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage +
HEADER_SIZE;
buffer = kmalloc(frame_sz, GFP_KERNEL | GFP_DMA);
- if (!buffer) {
- pr_err("Couldn't allocate USB buffer\n");
+ if (!buffer)
goto exit;
- }
while (gspca_dev->present && gspca_dev->streaming) {
#ifdef CONFIG_PM
--
2.14.1
Powered by blists - more mailing lists