2013-06-26 01:56:33

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] pinctrl: vt8500: wmt: remove redundant dev_err call in wmt_pinctrl_probe()

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/pinctrl/vt8500/pinctrl-wmt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index fb30edf3..0cc4335 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -570,10 +570,8 @@ int wmt_pinctrl_probe(struct platform_device *pdev,

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
data->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(data->base)) {
- dev_err(&pdev->dev, "failed to map memory resource\n");
+ if (IS_ERR(data->base))
return PTR_ERR(data->base);
- }

wmt_desc.pins = data->pins;
wmt_desc.npins = data->npins;


2013-06-26 05:38:36

by Tony Prisk

[permalink] [raw]
Subject: Re: [PATCH -next] pinctrl: vt8500: wmt: remove redundant dev_err call in wmt_pinctrl_probe()

On 26/06/13 13:56, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/pinctrl/vt8500/pinctrl-wmt.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
> index fb30edf3..0cc4335 100644
> --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
> +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
> @@ -570,10 +570,8 @@ int wmt_pinctrl_probe(struct platform_device *pdev,
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> data->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(data->base)) {
> - dev_err(&pdev->dev, "failed to map memory resource\n");
> + if (IS_ERR(data->base))
> return PTR_ERR(data->base);
> - }
>
> wmt_desc.pins = data->pins;
> wmt_desc.npins = data->npins;
Acked-by: Tony Prisk <[email protected]>

Regards
Tony P

2013-06-27 08:33:38

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH -next] pinctrl: vt8500: wmt: remove redundant dev_err call in wmt_pinctrl_probe()

On Wed, Jun 26, 2013 at 3:56 AM, Wei Yongjun <[email protected]> wrote:

> From: Wei Yongjun <[email protected]>
>
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Patch applied with Tony's ACK.

Yours,
Linus Walleij