summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath12k/qmi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index e7846aaca10a..964d350be748 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -2497,7 +2497,7 @@ static int ath12k_qmi_alloc_chunk(struct ath12k_base *ab,
chunk->size,
chunk->type);
ath12k_qmi_free_target_mem_chunk(ab);
- return 0;
+ return -EAGAIN;
}
ath12k_warn(ab, "memory allocation failure for %u size: %d\n",
chunk->type, chunk->size);
@@ -2600,6 +2600,14 @@ err:
mutex_unlock(&ag->mutex);
+ /* The firmware will attempt to request memory in smaller chunks
+ * on the next try. However, the current caller should be notified
+ * that this instance of request parsing was successful.
+ * Therefore, return 0 only.
+ */
+ if (ret == -EAGAIN)
+ ret = 0;
+
return ret;
}