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>

authored by Maciej W. Rozycki and committed by Linus Torvalds 417607d0 6c82c415

+1 -1
+1 -1
drivers/rtc/rtc-m41t80.c
··· 803 803 804 804 #ifdef CONFIG_RTC_DRV_M41T80_WDT 805 805 if (clientdata->features & M41T80_FEATURE_HT) { 806 + save_client = client; 806 807 rc = misc_register(&wdt_dev); 807 808 if (rc) 808 809 goto exit; ··· 812 811 misc_deregister(&wdt_dev); 813 812 goto exit; 814 813 } 815 - save_client = client; 816 814 } 817 815 #endif 818 816 return 0;