mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Check if sdio device is valid before start wifi
When loading sdio driver, need make sure sdio device is recognized, break driver loading if no device. Change-Id: I4d47575d793b58970012e4e47cc63b0c197f565d CRs-Fixed: 2245495
This commit is contained in:
parent
e8f2826b46
commit
e6d9450e79
1 changed files with 4 additions and 3 deletions
|
|
@ -75,15 +75,16 @@ static int pld_sdio_probe(struct sdio_func *sdio_func,
|
|||
const struct sdio_device_id *id)
|
||||
{
|
||||
struct pld_context *pld_context;
|
||||
struct device *dev = &sdio_func->dev;
|
||||
int ret = 0;
|
||||
struct device *dev;
|
||||
int ret;
|
||||
|
||||
pld_context = pld_get_global_context();
|
||||
if (!pld_context) {
|
||||
if (!pld_context || !sdio_func) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = &sdio_func->dev;
|
||||
ret = pld_add_dev(pld_context, dev, PLD_BUS_TYPE_SDIO);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue