diff mbox

[1/2] watchdog: s3c2410_wdt: Remove unneeded initialization

Message ID 1393925675-21636-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Commit a94dd879e2939798294c56468add3d6a8ef04137
Headers show

Commit Message

Sachin Kamat March 4, 2014, 9:34 a.m. UTC
Initializing clk to NULL as a reset/error condition does not
help as NULL is not an invalid condition w.r.t clk. Remove this
initialization altogether as there is no state retention.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/watchdog/s3c2410_wdt.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Guenter Roeck March 10, 2014, 2:32 a.m. UTC | #1
On 03/04/2014 01:34 AM, Sachin Kamat wrote:
> Initializing clk to NULL as a reset/error condition does not
> help as NULL is not an invalid condition w.r.t clk. Remove this
> initialization altogether as there is no state retention.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

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


--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wim Van Sebroeck March 15, 2014, 7:29 p.m. UTC | #2
Hi Sachin,

> Initializing clk to NULL as a reset/error condition does not
> help as NULL is not an invalid condition w.r.t clk. Remove this
> initialization altogether as there is no state retention.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/watchdog/s3c2410_wdt.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index aba6cd46b45b..a0f8f771adec 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -607,7 +607,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
>  
>   err_clk:
>  	clk_disable_unprepare(wdt->clock);
> -	wdt->clock = NULL;
>  
>   err:
>  	return ret;
> @@ -627,7 +626,6 @@ static int s3c2410wdt_remove(struct platform_device *dev)
>  	s3c2410wdt_cpufreq_deregister(wdt);
>  
>  	clk_disable_unprepare(wdt->clock);
> -	wdt->clock = NULL;
>  
>  	return 0;
>  }

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index aba6cd46b45b..a0f8f771adec 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -607,7 +607,6 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 
  err_clk:
 	clk_disable_unprepare(wdt->clock);
-	wdt->clock = NULL;
 
  err:
 	return ret;
@@ -627,7 +626,6 @@  static int s3c2410wdt_remove(struct platform_device *dev)
 	s3c2410wdt_cpufreq_deregister(wdt);
 
 	clk_disable_unprepare(wdt->clock);
-	wdt->clock = NULL;
 
 	return 0;
 }