mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] watchdog: w83697ug, fix lock imbalance
@ 2009-06-29 16:00 Jiri Slaby
  2009-06-29 19:22 ` Wim Van Sebroeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2009-06-29 16:00 UTC (permalink / raw)
  To: wim; +Cc: linux-kernel, Jiri Slaby

Don't forget to unlock io_lock when w83697ug_select_wd_register fails in
wdt_ctrl.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/watchdog/w83697ug_wdt.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/w83697ug_wdt.c b/drivers/watchdog/w83697ug_wdt.c
index 883b5f7..a6c12de 100644
--- a/drivers/watchdog/w83697ug_wdt.c
+++ b/drivers/watchdog/w83697ug_wdt.c
@@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout)
 {
 	spin_lock(&io_lock);
 
-	if (w83697ug_select_wd_register() < 0)
+	if (w83697ug_select_wd_register() < 0) {
+		spin_unlock(&io_lock);
 		return;
+	}
 
 	outb_p(0xF4, WDT_EFER);    /* Select CRF4 */
 	outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */
-- 
1.6.3.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/5] watchdog: w83697ug, fix lock imbalance
  2009-06-29 16:00 [PATCH 1/5] watchdog: w83697ug, fix lock imbalance Jiri Slaby
@ 2009-06-29 19:22 ` Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2009-06-29 19:22 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel

Hi Jiri,

Will add this to the linux-2.6-watchdog trees.

Kind regards,
Wim.

> Don't forget to unlock io_lock when w83697ug_select_wd_register fails in
> wdt_ctrl.
> 
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> ---
>  drivers/watchdog/w83697ug_wdt.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/watchdog/w83697ug_wdt.c b/drivers/watchdog/w83697ug_wdt.c
> index 883b5f7..a6c12de 100644
> --- a/drivers/watchdog/w83697ug_wdt.c
> +++ b/drivers/watchdog/w83697ug_wdt.c
> @@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout)
>  {
>  	spin_lock(&io_lock);
>  
> -	if (w83697ug_select_wd_register() < 0)
> +	if (w83697ug_select_wd_register() < 0) {
> +		spin_unlock(&io_lock);
>  		return;
> +	}
>  
>  	outb_p(0xF4, WDT_EFER);    /* Select CRF4 */
>  	outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */
> -- 
> 1.6.3.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-29 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 16:00 [PATCH 1/5] watchdog: w83697ug, fix lock imbalance Jiri Slaby
2009-06-29 19:22 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®