MIPS: ralink: Delete an error message for a failed memory allocation in rt_timer_probe()
Subsystems (3)
PATCH 1/1 MIPS: ralink: Delete an error message for a failed memory allocation in rt_timer_probe()
From: Markus Elfring <[email protected]>
Date: Wed, 24 May 2017 18:56:35 +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]>
--- arch/mips/ralink/timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/mips/ralink/timer.c +1 -3
@@ -103,10 +103,8 @@ static int rt_timer_probe(struct platform_device *pdev)struct clk *clk; rt =devm_kzalloc (&pdev->dev,sizeof (*rt),GFP_KERNEL ); -if (!rt) { -dev_err (&pdev->dev,"failed to allocate memory\n" ); +if (!rt)return -ENOMEM ; - } rt->irq =platform_get_irq (pdev,0 );if (!rt->irq) {
Signature · 1 line
2.13.0