diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2008-05-12 14:02:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 08:02:26 -0700 |
commit | 417607d05f41dbe2acccdb7a298a81d30ba1d22b (patch) | |
tree | 8e9b8fd1140aa9876a76da235e3fcbd7e6519682 /drivers/rtc/rtc-m41t80.c | |
parent | 6c82c4150910dedd449194cb6d286b80478f3542 (diff) | |
download | linux-stable-417607d05f41dbe2acccdb7a298a81d30ba1d22b.tar.gz linux-stable-417607d05f41dbe2acccdb7a298a81d30ba1d22b.tar.bz2 linux-stable-417607d05f41dbe2acccdb7a298a81d30ba1d22b.zip |
RTC/watchdog: M41T80: fix a potential use of unitialized data
Watchdog handlers within the driver make use of "save_client" -- make sure it
has been initalized before the handlers are registered.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
-rw-r--r-- | drivers/rtc/rtc-m41t80.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index 316bfaa80872..3d451ece253c 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -803,6 +803,7 @@ static int m41t80_probe(struct i2c_client *client, #ifdef CONFIG_RTC_DRV_M41T80_WDT if (clientdata->features & M41T80_FEATURE_HT) { + save_client = client; rc = misc_register(&wdt_dev); if (rc) goto exit; @@ -811,7 +812,6 @@ static int m41t80_probe(struct i2c_client *client, misc_deregister(&wdt_dev); goto exit; } - save_client = client; } #endif return 0; |