Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1734338 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-09-18 19:50 +0200 |
| Last post | 2017-09-18 19:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] [media] jl2005bcd: Delete an error message for a failed memory allocation in jl2005c_dostream() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-18 19:50 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-09-18 19:50 +0200 |
| Subject | [PATCH] [media] jl2005bcd: Delete an error message for a failed memory allocation in jl2005c_dostream() |
| Message-ID | <ur8lc-TR-17@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 18 Sep 2017 19:24:24 +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/jl2005bcd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c
index 17c7a953564c..23400ead1919 100644
--- a/drivers/media/usb/gspca/jl2005bcd.c
+++ b/drivers/media/usb/gspca/jl2005bcd.c
@@ -320,10 +320,8 @@ static void jl2005c_dostream(struct work_struct *work)
u8 *buffer;
buffer = kmalloc(JL2005C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA);
- if (!buffer) {
- pr_err("Couldn't allocate USB buffer\n");
+ if (!buffer)
goto quit_stream;
- }
while (gspca_dev->present && gspca_dev->streaming) {
#ifdef CONFIG_PM
--
2.14.1
Back to top | Article view | linux.kernel
csiph-web