2018-01-10 13:24:43

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

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/char/hw_random/exynos-trng.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
index 34d6f51..4c8a2be 100644
--- a/drivers/char/hw_random/exynos-trng.c
+++ b/drivers/char/hw_random/exynos-trng.c
@@ -129,10 +129,8 @@ static int exynos_trng_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
trng->mem = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(trng->mem)) {
- dev_err(&pdev->dev, "Could not map IO resources.\n");
+ if (IS_ERR(trng->mem))
return PTR_ERR(trng->mem);
- }

pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);


2018-01-10 14:24:19

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

On Wed, Jan 10, 2018 at 2:30 PM, Wei Yongjun <[email protected]> wrote:
> 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/char/hw_random/exynos-trng.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2018-01-11 11:13:52

by Łukasz Stelmach

[permalink] [raw]
Subject: Re: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

It was <2018-01-10 śro 14:30>, when Wei Yongjun wrote:
> 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]>

Acked-by: Łukasz Stelmach <[email protected]>

> ---
> drivers/char/hw_random/exynos-trng.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
> index 34d6f51..4c8a2be 100644
> --- a/drivers/char/hw_random/exynos-trng.c
> +++ b/drivers/char/hw_random/exynos-trng.c
> @@ -129,10 +129,8 @@ static int exynos_trng_probe(struct platform_device *pdev)
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> trng->mem = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(trng->mem)) {
> - dev_err(&pdev->dev, "Could not map IO resources.\n");
> + if (IS_ERR(trng->mem))
> return PTR_ERR(trng->mem);
> - }
>
> pm_runtime_enable(&pdev->dev);
> ret = pm_runtime_get_sync(&pdev->dev);
>
>
>
>

--
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics


Attachments:
signature.asc (472.00 B)

2018-01-18 12:04:24

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

On Wed, Jan 10, 2018 at 01:30:59PM +0000, Wei Yongjun wrote:
> 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. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt