1 From foo@baz Sat Jul 28 10:14:30 CEST 2018
2 From: Eyal Reizer <eyalreizer@gmail.com>
3 Date: Mon, 28 May 2018 11:36:42 +0300
4 Subject: wlcore: sdio: check for valid platform device data before suspend
6 From: Eyal Reizer <eyalreizer@gmail.com>
8 [ Upstream commit 6e91d48371e79862ea2c05867aaebe4afe55a865 ]
10 the wl pointer can be null In case only wlcore_sdio is probed while
11 no WiLink module is successfully probed, as in the case of mounting a
12 wl12xx module while using a device tree file configured with wl18xx
14 In this case the system was crashing in wl1271_suspend() as platform
15 device data is not set.
16 Make sure wl the pointer is valid before using it.
18 Signed-off-by: Eyal Reizer <eyalr@ti.com>
19 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
20 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 drivers/net/wireless/ti/wlcore/sdio.c | 5 +++++
24 1 file changed, 5 insertions(+)
26 --- a/drivers/net/wireless/ti/wlcore/sdio.c
27 +++ b/drivers/net/wireless/ti/wlcore/sdio.c
28 @@ -406,6 +406,11 @@ static int wl1271_suspend(struct device
29 mmc_pm_flag_t sdio_flags;
33 + dev_err(dev, "no wilink module was probed\n");
37 dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n",