diff mbox series

watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe

Message ID 20190709203409.117123-1-natechancellor@gmail.com (mailing list archive)
State Accepted
Headers show
Series watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe | expand

Commit Message

Nathan Chancellor July 9, 2019, 8:34 p.m. UTC
clang warns:

drivers/watchdog/digicolor_wdt.c:121:6: warning: unused variable 'ret'
[-Wunused-variable]
        int ret;
            ^
1 warning generated.

It's unused now, remove it.

Fixes: cdad26977e3f ("watchdog: digicolor_wdt: drop warning after registering device")
Link: https://github.com/ClangBuiltLinux/linux/issues/591
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/watchdog/digicolor_wdt.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Guenter Roeck July 9, 2019, 9 p.m. UTC | #1
On Tue, Jul 09, 2019 at 01:34:09PM -0700, Nathan Chancellor wrote:
> clang warns:
> 
> drivers/watchdog/digicolor_wdt.c:121:6: warning: unused variable 'ret'
> [-Wunused-variable]
>         int ret;
>             ^
> 1 warning generated.
> 
> It's unused now, remove it.
> 
> Fixes: cdad26977e3f ("watchdog: digicolor_wdt: drop warning after registering device")
> Link: https://github.com/ClangBuiltLinux/linux/issues/591
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

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

> ---
>  drivers/watchdog/digicolor_wdt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/watchdog/digicolor_wdt.c b/drivers/watchdog/digicolor_wdt.c
> index 33cda95bd238..073d37867f47 100644
> --- a/drivers/watchdog/digicolor_wdt.c
> +++ b/drivers/watchdog/digicolor_wdt.c
> @@ -118,7 +118,6 @@ static int dc_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct dc_wdt *wdt;
> -	int ret;
>  
>  	wdt = devm_kzalloc(dev, sizeof(struct dc_wdt), GFP_KERNEL);
>  	if (!wdt)
> -- 
> 2.22.0
>
Wolfram Sang July 18, 2019, 4:41 p.m. UTC | #2
On Tue, Jul 09, 2019 at 01:34:09PM -0700, Nathan Chancellor wrote:
> clang warns:
> 
> drivers/watchdog/digicolor_wdt.c:121:6: warning: unused variable 'ret'
> [-Wunused-variable]
>         int ret;
>             ^
> 1 warning generated.
> 
> It's unused now, remove it.
> 
> Fixes: cdad26977e3f ("watchdog: digicolor_wdt: drop warning after registering device")
> Link: https://github.com/ClangBuiltLinux/linux/issues/591
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Oops, sorry for missing this. I wonder why buildbot neither did find
it... Anyway:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
diff mbox series

Patch

diff --git a/drivers/watchdog/digicolor_wdt.c b/drivers/watchdog/digicolor_wdt.c
index 33cda95bd238..073d37867f47 100644
--- a/drivers/watchdog/digicolor_wdt.c
+++ b/drivers/watchdog/digicolor_wdt.c
@@ -118,7 +118,6 @@  static int dc_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct dc_wdt *wdt;
-	int ret;
 
 	wdt = devm_kzalloc(dev, sizeof(struct dc_wdt), GFP_KERNEL);
 	if (!wdt)