Skip to contentSkip to conversation

sq905: Delete an error message for a failed memory allocation in sq905_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 sq905: Delete an error message for a failed memory allocation in sq905_dostream()

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

---
 drivers/media/usb/gspca/sq905.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/gspca/sq905.c +1 -3
index f1da34a10ce8..ca8cdd753a2b 100644
@@ -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;
Signature · 1 line
2.14.1