From: Johannes Thumshirn Date: Tue, 2 Jun 2015 10:25:26 +0000 (+0200) Subject: watchdog: mena21_wdt: Fix possible NULL pointer dereference X-Git-Tag: omap-for-v4.3/legacy-v2-signed~78^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57337db1b9f96b897d2404531d8b6375667723fa;p=pandora-kernel.git watchdog: mena21_wdt: Fix possible NULL pointer dereference In a21_wdt_remove() we do a watchdog_unregister_device() on struct a21_wdt_drv->wdt but never assign it. Also move the dev_set_drvdata() call in front of the watchdog_register_device() call, so it doesn't look like an error. Signed-off-by: Johannes Thumshirn Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- Reading git-diff-tree failed