diff options
author | Bjørn Mork <bjorn@mork.no> | 2016-01-07 11:13:35 +0100 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2016-01-07 11:13:35 +0100 |
commit | 7f24b72a03e22452320deb6316838af2b28f6c9d (patch) | |
tree | 3037e9815c85150048871f24c73919c43a58fce3 | |
parent | f9cc5b8f69b31ab522e9c89ebfab984bad55eab0 (diff) |
early exit if unable to read from hw20160107-2
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r-- | main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -780,6 +780,11 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) SET_IEEE80211_DEV(hw, priv->dev); rc = mwl_alloc_pci_resource(priv); + + /* verify that we can communicate with the hardware */ + if (!rc && !mwl_fwcmd_chk_adapter(priv)) + rc = -ENODEV; + if (rc) goto err_alloc_pci_resource; @@ -791,7 +796,6 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) #endif rc = mwl_init_firmware(priv, fw_name); - if (rc) { wiphy_err(hw->wiphy, "%s: fail to initialize firmware\n", MWL_DRV_NAME); |