ath6kl: Return error from ath6kl_bmi_done()
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Fri, 22 Feb 2013 14:50:21 +0000 (20:20 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 5 Mar 2013 07:41:54 +0000 (09:41 +0200)
This addresses a FIXME in the driver.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/sdio.c

index 5d434cf..072a229 100644 (file)
@@ -1569,11 +1569,9 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
                goto err_power_off;
 
        /* Do we need to finish the BMI phase */
-       /* FIXME: return error from ath6kl_bmi_done() */
-       if (ath6kl_bmi_done(ar)) {
-               ret = -EIO;
+       ret = ath6kl_bmi_done(ar);
+       if (ret)
                goto err_power_off;
-       }
 
        /*
         * The reason we have to wait for the target here is that the
index d111980..0bd8ff6 100644 (file)
@@ -1123,10 +1123,12 @@ static int ath6kl_sdio_bmi_write(struct ath6kl *ar, u8 *buf, u32 len)
 
        ret = ath6kl_sdio_read_write_sync(ar, addr, buf, len,
                                          HIF_WR_SYNC_BYTE_INC);
-       if (ret)
+       if (ret) {
                ath6kl_err("unable to send the bmi data to the device\n");
+               return ret;
+       }
 
-       return ret;
+       return 0;
 }
 
 static int ath6kl_sdio_bmi_read(struct ath6kl *ar, u8 *buf, u32 len)