mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Merge "cnss2: add null pointer check"
This commit is contained in:
commit
cec1e76763
1 changed files with 9 additions and 0 deletions
|
|
@ -284,6 +284,9 @@ int cnss_wlan_enable(struct device *dev,
|
|||
struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (!plat_priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (plat_priv->device_id == QCA6174_DEVICE_ID)
|
||||
return 0;
|
||||
|
||||
|
|
@ -320,6 +323,9 @@ int cnss_wlan_disable(struct device *dev, enum cnss_driver_mode mode)
|
|||
struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (!plat_priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (plat_priv->device_id == QCA6174_DEVICE_ID)
|
||||
return 0;
|
||||
|
||||
|
|
@ -395,6 +401,9 @@ int cnss_set_fw_log_mode(struct device *dev, u8 fw_log_mode)
|
|||
{
|
||||
struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);
|
||||
|
||||
if (!plat_priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (plat_priv->device_id == QCA6174_DEVICE_ID)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue