Skip to content

Commit

Permalink
RTC/watchdog: M41T80: fix a potential use of unitialized data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maciej W. Rozycki authored and Linus Torvalds committed May 13, 2008
1 parent 6c82c41 commit 417607d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -811,7 +812,6 @@ static int m41t80_probe(struct i2c_client *client,
misc_deregister(&wdt_dev);
goto exit;
}
save_client = client;
}
#endif
return 0;
Expand Down

0 comments on commit 417607d

Please sign in to comment.