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

Commit 0fcc91ae authored by Mohammed Siddiq's avatar Mohammed Siddiq
Browse files

cnss2: Avoid null pointer dereference of cnss_platform_cap



Add change to avoid null pointer dereference of cnss_platform_cap.

Change-Id: Ib48f192a54c8d48031d5fbc743622af6c2fdb19c
Signed-off-by: default avatarMohammed Siddiq <msiddiq@codeaurora.org>
parent e900a317
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;
}