ath10k: sdio: add missing error check
authorErik Stromdahl <erik.stromdahl@gmail.com>
Fri, 19 Apr 2019 07:29:06 +0000 (10:29 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 23 Apr 2019 13:26:19 +0000 (16:26 +0300)
Although not likely, the bundle allocation might fail.
Add proper error check and warning print.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/sdio.c

index d5073fac9509a829a8acbdda6d117251b84bff37..30102090e2827ffe14df36afdb38b096d01ba640 100644 (file)
@@ -584,6 +584,11 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
                                                                act_len,
                                                                &bndl_cnt);
 
+                       if (ret) {
+                               ath10k_warn(ar, "alloc_bundle error %d\n", ret);
+                               goto err;
+                       }
+
                        n_lookaheads += bndl_cnt;
                        i += bndl_cnt;
                        /*Next buffer will be the last in the bundle */