Skip to contentSkip to conversation

MIPS: ralink: Delete an error message for a failed memory allocation in rt_timer_probe()

PATCH New SF Markus Elfring 1 participant 1 message May 24, 2017

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

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.

---
 arch/mips/ralink/timer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/mips/ralink/timer.c +1 -3
index d4469b20d176..efccb444d6bc 100644
@@ -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