mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "cnss2: Avoid null pointer dereference of cnss_platform_cap"
This commit is contained in:
commit
2592f57116
1 changed files with 5 additions and 2 deletions
|
|
@ -163,8 +163,11 @@ int cnss_get_platform_cap(struct device *dev, struct cnss_platform_cap *cap)
|
|||
if (!plat_priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (cap)
|
||||
*cap = plat_priv->cap;
|
||||
if (!cap)
|
||||
return -EINVAL;
|
||||
|
||||
*cap = plat_priv->cap;
|
||||
cnss_pr_dbg("Platform cap_flag is 0x%x\n", cap->cap_flag);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue