Commit b5326119 authored by Eyal Reizer's avatar Eyal Reizer Committed by Greg Kroah-Hartman

wlcore: sdio: check for valid platform device data before suspend

[ Upstream commit 6e91d483 ]

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: default avatarEyal Reizer <eyalr@ti.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efd8946b
...@@ -388,6 +388,11 @@ static int wl1271_suspend(struct device *dev) ...@@ -388,6 +388,11 @@ static int wl1271_suspend(struct device *dev)
mmc_pm_flag_t sdio_flags; mmc_pm_flag_t sdio_flags;
int ret = 0; 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", dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n",
wl->wow_enabled); wl->wow_enabled);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment