diff mbox

power: reset: at91-poweroff: Remove redundant dev_err call in at91_poweroff_probe()

Message ID 20180316100325.GB26372@lenoch (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ladislav Michl March 16, 2018, 10:03 a.m. UTC
There is an error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundancy.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 drivers/power/reset/at91-poweroff.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Nicolas Ferre March 16, 2018, 11:15 a.m. UTC | #1
On 16/03/2018 at 11:03, Ladislav Michl wrote:
> There is an error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundancy.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>   drivers/power/reset/at91-poweroff.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
> index f8f88798cb66..fb2fc8f741a1 100644
> --- a/drivers/power/reset/at91-poweroff.c
> +++ b/drivers/power/reset/at91-poweroff.c
> @@ -159,10 +159,8 @@ static int __init at91_poweroff_probe(struct platform_device *pdev)
>   
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   	at91_shdwc_base = devm_ioremap_resource(&pdev->dev, res);
> -	if (IS_ERR(at91_shdwc_base)) {
> -		dev_err(&pdev->dev, "Could not map reset controller address\n");
> +	if (IS_ERR(at91_shdwc_base))
>   		return PTR_ERR(at91_shdwc_base);
> -	}
>   
>   	sclk = devm_clk_get(&pdev->dev, NULL);
>   	if (IS_ERR(sclk))
>
diff mbox

Patch

diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
index f8f88798cb66..fb2fc8f741a1 100644
--- a/drivers/power/reset/at91-poweroff.c
+++ b/drivers/power/reset/at91-poweroff.c
@@ -159,10 +159,8 @@  static int __init at91_poweroff_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	at91_shdwc_base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(at91_shdwc_base)) {
-		dev_err(&pdev->dev, "Could not map reset controller address\n");
+	if (IS_ERR(at91_shdwc_base))
 		return PTR_ERR(at91_shdwc_base);
-	}
 
 	sclk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(sclk))