diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 17228f77d22f98f8b6f2f0af3167bc90a0562c4e..bec98bd67abd10203b1b9d6f9d3e91fcf792edc1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3540,6 +3540,7 @@ int iwl_probe(void *bus_specific, struct iwl_bus_ops *bus_ops,
 		priv->cfg->name, hw_rev);
 
 	if (iwl_prepare_card_hw(priv)) {
+		err = -EIO;
 		IWL_WARN(priv, "Failed, HW not ready\n");
 		goto out_free_traffic_mem;
 	}