Skip to contentSkip to conversation

Input: Remove unnecessary print function dev_err()

PATCH Applied Yang Li 2 participants 2 messages Apr 27, 2022 – Jun 29, 2022

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 Input: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/input/joystick/sensehat-joystick.c:102:2-9: line 102 is redundant because platform_get_irq() already prints an error

---
 drivers/input/joystick/sensehat-joystick.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/input/joystick/sensehat-joystick.c +1 -3
index 5ad1fe4ff496..a84df39d3b2f 100644
@@ -98,10 +98,8 @@ static int sensehat_joystick_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "Could not retrieve interrupt request");
+	if (irq < 0)
 		return irq;
-	}
 
 	error = devm_request_threaded_irq(&pdev->dev, irq,
 					  NULL, sensehat_joystick_report,
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#1 lore raw
Quoted 9 lines · Yang Li

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/input/joystick/sensehat-joystick.c:102:2-9: line 102 is redundant because platform_get_irq() already prints an error

Applied, thank you.

Signature · 1 line
Dmitry