diff mbox series

[-next] Watchdog: Remove redundant dev_err_probe() for platform_get_irq()

Message ID 20230901070929.1317982-1-ruanjinjie@huawei.com
State New
Headers show
Series [-next] Watchdog: Remove redundant dev_err_probe() for platform_get_irq() | expand

Commit Message

Jinjie Ruan Sept. 1, 2023, 7:09 a.m. UTC
Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
to platform_get_irq*()"), there is no need to call the dev_err_probe()
function directly to print a custom message when handling an error
from platform_get_irq() function as it is going to display an appropriate
error message in case of a failure.

Fixes: ef9e7fe2c890 ("Watchdog: Add marvell GTI watchdog driver")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/watchdog/marvell_gti_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck Sept. 1, 2023, 1:17 p.m. UTC | #1
On 9/1/23 00:09, Jinjie Ruan wrote:
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
> to platform_get_irq*()"), there is no need to call the dev_err_probe()
> function directly to print a custom message when handling an error
> from platform_get_irq() function as it is going to display an appropriate
> error message in case of a failure.
> 
> Fixes: ef9e7fe2c890 ("Watchdog: Add marvell GTI watchdog driver")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

Please always include the driver name in the subject of a patch.

Otherwise

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>   drivers/watchdog/marvell_gti_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
> index d7eb8286e11e..d5a1ff91d423 100644
> --- a/drivers/watchdog/marvell_gti_wdt.c
> +++ b/drivers/watchdog/marvell_gti_wdt.c
> @@ -308,7 +308,7 @@ static int gti_wdt_probe(struct platform_device *pdev)
>   
>   	irq = platform_get_irq(pdev, 0);
>   	if (irq < 0)
> -		return dev_err_probe(&pdev->dev, irq, "IRQ resource not found\n");
> +		return irq;
>   
>   	err = devm_request_irq(dev, irq, gti_wdt_interrupt, 0,
>   			       pdev->name, &priv->wdev);
diff mbox series

Patch

diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
index d7eb8286e11e..d5a1ff91d423 100644
--- a/drivers/watchdog/marvell_gti_wdt.c
+++ b/drivers/watchdog/marvell_gti_wdt.c
@@ -308,7 +308,7 @@  static int gti_wdt_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(&pdev->dev, irq, "IRQ resource not found\n");
+		return irq;
 
 	err = devm_request_irq(dev, irq, gti_wdt_interrupt, 0,
 			       pdev->name, &priv->wdev);