* [PATCH] Input: msm: Tweak an error message
@ 2019-02-09 9:01 Dan Carpenter
2019-02-09 16:52 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-02-09 9:01 UTC (permalink / raw)
To: kernel-janitors
The PTR_ERR(NULL) value is zero and it's not useful to print that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/input/misc/msm-vibrator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/misc/msm-vibrator.c b/drivers/input/misc/msm-vibrator.c
index c06941021447..69f2579c4ec2 100644
--- a/drivers/input/misc/msm-vibrator.c
+++ b/drivers/input/misc/msm-vibrator.c
@@ -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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: msm: Tweak an error message
2019-02-09 9:01 [PATCH] Input: msm: Tweak an error message Dan Carpenter
@ 2019-02-09 16:52 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2019-02-09 16:52 UTC (permalink / raw)
To: kernel-janitors
On Sat, Feb 09, 2019 at 12:01:06PM +0300, Dan Carpenter wrote:
> The PTR_ERR(NULL) value is zero and it's not useful to print that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thank you.
> ---
> drivers/input/misc/msm-vibrator.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/msm-vibrator.c b/drivers/input/misc/msm-vibrator.c
> index c06941021447..69f2579c4ec2 100644
> --- a/drivers/input/misc/msm-vibrator.c
> +++ b/drivers/input/misc/msm-vibrator.c
> @@ -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;
> }
>
> --
> 2.17.1
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-09 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-09 9:01 [PATCH] Input: msm: Tweak an error message Dan Carpenter
2019-02-09 16:52 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox