From 2273f42df1a52bb3aa827163e285528afbf7616c Mon Sep 17 00:00:00 2001 From: "weiyongjun \\(A\\)" Date: Wed, 10 Jan 2018 13:30:59 +0000 Subject: [PATCH] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Krzysztof Kozlowski Acked-by: Łukasz Stelmach Signed-off-by: Herbert Xu --- 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 f4643e3..1947aed 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); -- 2.7.4