watchdog: imgpdc: Fix probe NULL pointer dereference
watchdog: imgpdc: Fix probe NULL pointer dereference

The IMG PDC watchdog probe function calls pdc_wdt_stop() prior to
watchdog_set_drvdata(), causing a NULL pointer dereference when
pdc_wdt_stop() retrieves the struct pdc_wdt_dev pointer using
watchdog_get_drvdata() and reads the register base address through it.

Fix by moving the watchdog_set_drvdata() call earlier, to where various
other pdc_wdt->wdt_dev fields are initialised.

Fixes: 93937669e9b5 ("watchdog: ImgTec PDC Watchdog Timer Driver")
Signed-off-by: James Hogan <547fa85bb3888a0222eed8ec39e36708605c6d53@imgtec.com>
Cc: Ezequiel Garcia <7248f52d8926fd82a5eb079a13afe9dd79e34c7a@imgtec.com>
Cc: Naidu Tellapati <75dccddd58cb17b6a27312ab88c671d81ad4d97f@imgtec.com>
Cc: Jude Abraham <de40fa53201adc6405b0e9fe404dded79606c84c@imgtec.com>
Cc: ee6bd6521c0edd0140322317c8db66d3b09bded1@vger.kernel.org
Reviewed-by: Guenter Roeck <ba324ca7b1c77fc20bb970d5aff6eea9377918a5@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <5f65f6985de1ebf15dde04e0dc4668211868bafa@iguana.be>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs