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

Commit 074cdf9e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Return failure if bus type do not match"

parents f73796d0 e405d025
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -749,6 +749,12 @@ int cnss_wlan_register_driver(struct cnss_wlan_driver *driver_ops)
		return -ENODEV;
	}

	if (plat_priv->bus_type != CNSS_BUS_PCI) {
		cnss_pr_err("Wrong bus type. Expected bus_type %d\n",
			    plat_priv->bus_type);
		return -EFAULT;
	}

	pci_priv = plat_priv->bus_priv;
	if (!pci_priv) {
		cnss_pr_err("pci_priv is NULL\n");
+6 −0
Original line number Diff line number Diff line
@@ -73,6 +73,12 @@ int cnss_usb_wlan_register_driver(struct cnss_usb_wlan_driver *driver_ops)
		return -ENODEV;
	}

	if (plat_priv->bus_type != CNSS_BUS_USB) {
		cnss_pr_err("Wrong bus type. Expected bus_type %d\n",
			    plat_priv->bus_type);
		return -EFAULT;
	}

	usb_priv = plat_priv->bus_priv;
	usb_priv->plat_priv = plat_priv;