mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge "qcacld-3.0: Convert probe return error from -ENOMEM to -EPROBE_DEFER" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
18ddaf4591
1 changed files with 22 additions and 1 deletions
|
|
@ -311,6 +311,27 @@ static void hdd_init_qdf_ctx(struct device *dev, void *bdev,
|
|||
qdf_dev->bid = bid;
|
||||
}
|
||||
|
||||
/**
|
||||
* check_for_probe_defer() - API to check return value
|
||||
* @ret: Return Value
|
||||
*
|
||||
* Return: return -EPROBE_DEFER to platform driver if return value
|
||||
* is -ENOMEM. Platform driver will try to re-probe.
|
||||
*/
|
||||
#ifdef MODULE
|
||||
static int check_for_probe_defer(int ret)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static int check_for_probe_defer(int ret)
|
||||
{
|
||||
if (ret == -ENOMEM)
|
||||
return -EPROBE_DEFER;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_hdd_probe() - handles probe request
|
||||
*
|
||||
|
|
@ -407,7 +428,7 @@ err_hdd_deinit:
|
|||
cds_set_fw_down(false);
|
||||
hdd_stop_driver_ops_timer();
|
||||
mutex_unlock(&hdd_init_deinit_lock);
|
||||
return ret;
|
||||
return check_for_probe_defer(ret);
|
||||
}
|
||||
|
||||
static inline void hdd_pld_driver_unloading(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue