mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
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>
This commit is contained in:
parent
88027c8ff0
commit
6e91d48371
@ -399,6 +399,11 @@ static int wl1271_suspend(struct device *dev)
|
||||
mmc_pm_flag_t sdio_flags;
|
||||
int ret = 0;
|
||||
|
||||
if (!wl) {
|
||||
dev_err(dev, "no wilink module was probed\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n",
|
||||
wl->wow_enabled);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user