OSDN Git Service

cnss2: Return proper error code for nonsupported devices
authorYue Ma <yuem@codeaurora.org>
Thu, 21 Sep 2017 20:55:53 +0000 (13:55 -0700)
committerYue Ma <yuem@codeaurora.org>
Thu, 21 Sep 2017 21:13:40 +0000 (14:13 -0700)
Platform driver only forces FW assert for supported devices.
Return proper error code for nonsupported devices so that WLAN
host driver can handle properly.

Change-Id: Iaf88f64564b14425404404db6a7789a7913db74f
CRs-fixed: 2059087
Signed-off-by: Yue Ma <yuem@codeaurora.org>
drivers/net/wireless/cnss2/main.c

index 23a81ff..c033d84 100644 (file)
@@ -1613,7 +1613,7 @@ int cnss_force_fw_assert(struct device *dev)
 
        if (plat_priv->device_id == QCA6174_DEVICE_ID) {
                cnss_pr_info("Forced FW assert is not supported\n");
-               return -EINVAL;
+               return -EOPNOTSUPP;
        }
 
        if (test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)) {