OSDN Git Service

wlcore: sdio: check for valid platform device data before suspend
authorEyal Reizer <eyalreizer@gmail.com>
Mon, 28 May 2018 08:36:42 +0000 (11:36 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 29 May 2018 07:20:56 +0000 (10:20 +0300)
commit6e91d48371e79862ea2c05867aaebe4afe55a865
tree54a601415955c120d9f5dd298a756f2d2a07a175
parent88027c8ff0a3f87d5d06d53ee25a41b90d8bccec
wlcore: sdio: check for valid platform device data before suspend

the wl pointer can be null In case only wlcore_sdio is probed while
no WiLink module is successfully probed, as in the case of mounting a
wl12xx module while using a device tree file configured with wl18xx
related settings.
In this case the system was crashing in wl1271_suspend() as platform
device data is not set.
Make sure wl the pointer is valid before using it.

Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/sdio.c