All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd/viperboard: Delete an error message for a failed memory allocation in vprbrd_probe()
@ 2018-01-16 16:42 ` SF Markus Elfring
  0 siblings, 0 replies; 25+ messages in thread
From: SF Markus Elfring @ 2018-01-16 16:42 UTC (permalink / raw)
  To: kernel-janitors, Lee Jones; +Cc: LKML, Lars Pöschel, Samuel Ortiz

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jan 2018 17:30:23 +0100

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/mfd/viperboard.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index e6b3c70aeb22..e9f61262d583 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -59,10 +59,8 @@ static int vprbrd_probe(struct usb_interface *interface,
 
 	/* allocate memory for our device state and initialize it */
 	vb = kzalloc(sizeof(*vb), GFP_KERNEL);
-	if (vb == NULL) {
-		dev_err(&interface->dev, "Out of memory\n");
+	if (!vb)
 		return -ENOMEM;
-	}
 
 	mutex_init(&vb->lock);
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-01-29 10:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 16:42 [PATCH] mfd/viperboard: Delete an error message for a failed memory allocation in vprbrd_probe() SF Markus Elfring
2018-01-16 16:42 ` SF Markus Elfring
2018-01-23 12:58 ` Lee Jones
2018-01-23 12:58   ` Lee Jones
2018-01-23 13:01   ` Lee Jones
2018-01-23 13:01     ` Lee Jones
2018-01-23 14:05     ` SF Markus Elfring
2018-01-23 14:05       ` SF Markus Elfring
2018-01-23 15:14       ` Lee Jones
2018-01-23 15:56         ` mfd: Patch management? SF Markus Elfring
2018-01-23 15:56           ` SF Markus Elfring
2018-01-23 16:31           ` Lee Jones
2018-01-23 16:31             ` Lee Jones
2018-01-23 16:49             ` SF Markus Elfring
2018-01-23 16:49               ` SF Markus Elfring
     [not found]             ` <49873902-c947-468d-094a-4ac175850116@users.sourceforge.net>
2018-01-26 11:45               ` Lee Jones
2018-01-26 11:45                 ` Lee Jones
     [not found]                 ` <c6e799c3-e118-20a1-3a9f-72950a080d03@users.sourceforge.net>
2018-01-26 14:12                   ` Lee Jones
2018-01-26 14:12                     ` Lee Jones
2018-01-26 16:28                     ` SF Markus Elfring
2018-01-26 16:28                       ` SF Markus Elfring
2018-01-29  9:35                       ` Lee Jones
2018-01-29  9:35                         ` Lee Jones
2018-01-29 10:15                         ` SF Markus Elfring
2018-01-29 10:15                           ` SF Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.