Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2592f571 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Avoid null pointer dereference of cnss_platform_cap"

parents b8a0ce3f 0fcc91ae
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -163,8 +163,11 @@ int cnss_get_platform_cap(struct device *dev, struct cnss_platform_cap *cap)
	if (!plat_priv)
		return -ENODEV;

	if (cap)
	if (!cap)
		return -EINVAL;

	*cap = plat_priv->cap;
	cnss_pr_dbg("Platform cap_flag is 0x%x\n", cap->cap_flag);

	return 0;
}