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

Commit 3de6f27e 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 61e1cc9e 7457be3b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -203,9 +203,10 @@ 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;