OSDN Git Service

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 d5073fa..3010209 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 */