2021-08-14 14:29:18

by Tang Bin

[permalink] [raw]
Subject: [PATCH] watchdog: stm32_iwdg: drop superfluous error message

In the function stm32_iwdg_probe(), devm_platform_ioremap_resource
has already contained error message, so drop the redundant one.

Co-developed-by: Zhang Shengju <[email protected]>
Signed-off-by: Zhang Shengju <[email protected]>
Signed-off-by: Tang Bin <[email protected]>
---
drivers/watchdog/stm32_iwdg.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
index a3436c296..570a71509 100644
--- a/drivers/watchdog/stm32_iwdg.c
+++ b/drivers/watchdog/stm32_iwdg.c
@@ -237,10 +237,8 @@ static int stm32_iwdg_probe(struct platform_device *pdev)

/* This is the timer base. */
wdt->regs = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(wdt->regs)) {
- dev_err(dev, "Could not get resource\n");
+ if (IS_ERR(wdt->regs))
return PTR_ERR(wdt->regs);
- }

ret = stm32_iwdg_clk_init(pdev, wdt);
if (ret)
--
2.20.1.windows.1




2021-08-14 15:04:58

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] watchdog: stm32_iwdg: drop superfluous error message

On 8/14/21 7:27 AM, Tang Bin wrote:
> In the function stm32_iwdg_probe(), devm_platform_ioremap_resource
> has already contained error message, so drop the redundant one.
>
> Co-developed-by: Zhang Shengju <[email protected]>
> Signed-off-by: Zhang Shengju <[email protected]>
> Signed-off-by: Tang Bin <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
> drivers/watchdog/stm32_iwdg.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
> index a3436c296..570a71509 100644
> --- a/drivers/watchdog/stm32_iwdg.c
> +++ b/drivers/watchdog/stm32_iwdg.c
> @@ -237,10 +237,8 @@ static int stm32_iwdg_probe(struct platform_device *pdev)
>
> /* This is the timer base. */
> wdt->regs = devm_platform_ioremap_resource(pdev, 0);
> - if (IS_ERR(wdt->regs)) {
> - dev_err(dev, "Could not get resource\n");
> + if (IS_ERR(wdt->regs))
> return PTR_ERR(wdt->regs);
> - }
>
> ret = stm32_iwdg_clk_init(pdev, wdt);
> if (ret)
>