Re: [PATCH] watchdog: mena21_wdt: Fix possible NULL pointer dereference

2015-06-22 Thread Johannes Thumshirn
On Tue, Jun 02, 2015 at 06:44:48AM -0700, Guenter Roeck wrote: > On 06/02/2015 03:25 AM, Johannes Thumshirn wrote: > >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_

Re: [PATCH] watchdog: mena21_wdt: Fix possible NULL pointer dereference

2015-06-02 Thread Guenter Roeck
On 06/02/2015 03:25 AM, Johannes Thumshirn wrote: 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: Johan