Skip to contentSkip to conversation

staging: vt6656: Delete an error message for a failed memory allocation in vnt_alloc_bufs()

PATCH New SF Markus Elfring 1 participant 1 message Dec 13, 2017

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

PATCH 1/1 staging: vt6656: Delete an error message for a failed memory allocation in vnt_alloc_bufs()

From: Markus Elfring <[email protected]>
Date: Wed, 13 Dec 2017 15:15:45 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/staging/vt6656/main_usb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/vt6656/main_usb.c +1 -4
index cc6d8778fe5b..554b21e40298 100644
@@ -437,11 +437,8 @@ static bool vnt_alloc_bufs(struct vnt_private *priv)
 
 	for (ii = 0; ii < priv->num_rcb; ii++) {
 		priv->rcb[ii] = kzalloc(sizeof(*priv->rcb[ii]), GFP_KERNEL);
-		if (!priv->rcb[ii]) {
-			dev_err(&priv->usb->dev,
-				"failed to allocate rcb no %d\n", ii);
+		if (!priv->rcb[ii])
 			goto free_rx_tx;
-		}
 
 		rcb = priv->rcb[ii];
 
Signature · 1 line
2.15.1