public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sbus: Delete an error message for a failed memory allocation in uctrl_probe()
@ 2017-08-26 19:26 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-08-26 19:26 UTC (permalink / raw)
  To: sparclinux, David S. Miller, Rob Herring; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 26 Aug 2017 21:21:33 +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/sbus/char/uctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 0a5013350acd..f3b9f7e87ffa 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -352,10 +352,8 @@ static int uctrl_probe(struct platform_device *op)
 	int err = -ENOMEM;
 
 	p = kzalloc(sizeof(*p), GFP_KERNEL);
-	if (!p) {
-		printk(KERN_ERR "uctrl: Unable to allocate device struct.\n");
+	if (!p)
 		goto out;
-	}
 
 	p->regs = of_ioremap(&op->resource[0], 0,
 			     resource_size(&op->resource[0]),
-- 
2.14.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-26 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 19:26 [PATCH] sbus: Delete an error message for a failed memory allocation in uctrl_probe() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox