lkml.org 
[lkml]   [2017]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/2] [media] vicam: Delete an error message for a failed memory allocation in vicam_dostream()
From
Date
From: Markus Elfring <elfring@users.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@users.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
\
 
 \ /
  Last update: 2017-09-18 22:12    [W:0.033 / U:9.132 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site