Bläddra i källkod

Merge "icnss2: Reject wlan host driver loading" into wlan-platform.lnx.1.0

CNSS_WLAN Service 2 år sedan
förälder
incheckning
5ed26e24cb
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      icnss2/main.c

+ 5 - 5
icnss2/main.c

@@ -2455,11 +2455,6 @@ enable_pdr:
 static int icnss_dev_id_match(struct icnss_priv *priv,
 			      struct device_info *dev_info)
 {
-	if (!dev_info) {
-		icnss_pr_info("WLAN driver devinfo is null, Continue driver loading");
-		return 1;
-	}
-
 	while (dev_info->device_id) {
 		if (priv->device_id == dev_info->device_id)
 			return 1;
@@ -2662,6 +2657,11 @@ int __icnss_register_driver(struct icnss_driver_ops *ops,
 		goto out;
 	}
 
+	if (!ops->dev_info) {
+		icnss_pr_err("WLAN driver devinfo is null, Reject wlan driver loading");
+		return -EINVAL;
+	}
+
 	if (!icnss_dev_id_match(priv, ops->dev_info)) {
 		icnss_pr_err("WLAN driver dev name is %s, not supported by platform driver\n",
 			     ops->dev_info->name);