Skip to contentSkip to conversation

jl2005bcd: Delete an error message for a failed memory allocation in jl2005c_dostream()

PATCH New SF Markus Elfring 1 participant 1 message Sep 18, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jl2005bcd: Delete an error message for a failed memory allocation in jl2005c_dostream()

From: Markus Elfring <[email protected]>
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.

---
 drivers/media/usb/gspca/jl2005bcd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/gspca/jl2005bcd.c +1 -3
index 17c7a953564c..23400ead1919 100644
@@ -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
Signature · 1 line
2.14.1