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

Commit 0c5cffa6 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Fix a bug in NULL pointer checking



Use correct way to check NULL pointer. Remove redundant pointer
checking as well.

Change-Id: I62710c8753bab0afe27c1005d3872449d0f46e86
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 9e11d7b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ static void cnss_pci_event_cb(struct msm_pcie_notify *notify)
	struct pci_dev *pci_dev;
	struct cnss_pci_data *pci_priv;

	if (notify == NULL || notify->user)
	if (!notify)
		return;

	pci_dev = notify->user;
@@ -274,7 +274,7 @@ static void cnss_pci_event_cb(struct msm_pcie_notify *notify)
		return;

	pci_priv = cnss_get_pci_priv(pci_dev);
	if (pci_priv)
	if (!pci_priv)
		return;

	switch (notify->event) {