* [PATCH] [media] sq905: Delete an error message for a failed memory allocation in sq905_dostream()
@ 2017-09-18 19:34 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-09-18 19:34 UTC (permalink / raw)
To: linux-media, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 18 Sep 2017 21:30:58 +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/sq905.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c
index f1da34a10ce8..ca8cdd753a2b 100644
--- a/drivers/media/usb/gspca/sq905.c
+++ b/drivers/media/usb/gspca/sq905.c
@@ -218,10 +218,8 @@ static void sq905_dostream(struct work_struct *work)
u8 *buffer;
buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA);
- if (!buffer) {
- pr_err("Couldn't allocate USB buffer\n");
+ if (!buffer)
goto quit_stream;
- }
frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage
+ FRAME_HEADER_LEN;
--
2.14.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-18 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-18 19:34 [PATCH] [media] sq905: Delete an error message for a failed memory allocation in sq905_dostream() SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).