sbus: Delete an error message for a failed memory allocation in uctrl_probe()
Subsystems (2)
PATCH 1/1 sbus: Delete an error message for a failed memory allocation in uctrl_probe()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/sbus/char/uctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/sbus/char/uctrl.c +1 -3
@@ -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]),
Signature · 1 line
2.14.0