diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index f4643e3ec34632b278f83ee05f940074207b2d72..1947aed7c0443197069f2881635acf4f28c941a5 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);