Skip to contentSkip to conversation

Input: msm: Tweak an error message

PATCH Applied Dan Carpenter 2 participants 2 messages Feb 9, 2019

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

PATCH 1/1 Input: msm: Tweak an error message

The PTR_ERR(NULL) value is zero and it's not useful to print that.

---
 drivers/input/misc/msm-vibrator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/misc/msm-vibrator.c +1 -2
index c06941021447..69f2579c4ec2 100644
@@ -199,8 +199,7 @@ static int msm_vibrator_probe(struct platform_device *pdev)
 	vibrator->base = devm_ioremap(&pdev->dev, res->start,
 				     resource_size(res));
 	if (!vibrator->base) {
-		dev_err(&pdev->dev, "Failed to iomap resource: %ld\n",
-			PTR_ERR(vibrator->base));
+		dev_err(&pdev->dev, "Failed to iomap resource.\n");
 		return -ENOMEM;
 	}
 
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Dan Carpenter

The PTR_ERR(NULL) value is zero and it's not useful to print that.

Applied, thank you.

Quoted 21 lines
---
 drivers/input/misc/msm-vibrator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/misc/msm-vibrator.c +1 -2
index c06941021447..69f2579c4ec2 100644
@@ -199,8 +199,7 @@ static int msm_vibrator_probe(struct platform_device *pdev)
 	vibrator->base = devm_ioremap(&pdev->dev, res->start,
 				     resource_size(res));
 	if (!vibrator->base) {
-		dev_err(&pdev->dev, "Failed to iomap resource: %ld\n",
-			PTR_ERR(vibrator->base));
+		dev_err(&pdev->dev, "Failed to iomap resource.\n");
 		return -ENOMEM;
 	}
 
Signature · 1 line
2.17.1
Signature · 1 line
Dmitry