All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
@ 2020-04-27 10:46 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-04-27 10:46 UTC (permalink / raw)
  To: Kalle Valo, John Crispin
  Cc: linux-wireless, kernel-janitors, Wei Yongjun, ath11k

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/ath/ath11k/dp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 50350f77b309..2f35d325f7a5 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -909,8 +909,10 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
 		dp->tx_ring[i].tx_status_head = 0;
 		dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1;
 		dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL);
-		if (!dp->tx_ring[i].tx_status)
+		if (!dp->tx_ring[i].tx_status) {
+			ret = -ENOMEM;
 			goto fail_cmn_srng_cleanup;
+		}
 	}
 
 	for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++)




_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
@ 2020-04-27 10:46 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-04-27 10:46 UTC (permalink / raw)
  To: Kalle Valo, John Crispin
  Cc: linux-wireless, kernel-janitors, Wei Yongjun, ath11k

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/ath/ath11k/dp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 50350f77b309..2f35d325f7a5 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -909,8 +909,10 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
 		dp->tx_ring[i].tx_status_head = 0;
 		dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1;
 		dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL);
-		if (!dp->tx_ring[i].tx_status)
+		if (!dp->tx_ring[i].tx_status) {
+			ret = -ENOMEM;
 			goto fail_cmn_srng_cleanup;
+		}
 	}
 
 	for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
@ 2020-04-27 10:46 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-04-27 10:46 UTC (permalink / raw)
  To: Kalle Valo, John Crispin
  Cc: Wei Yongjun, ath11k, linux-wireless, kernel-janitors

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/ath/ath11k/dp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 50350f77b309..2f35d325f7a5 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -909,8 +909,10 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
 		dp->tx_ring[i].tx_status_head = 0;
 		dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1;
 		dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL);
-		if (!dp->tx_ring[i].tx_status)
+		if (!dp->tx_ring[i].tx_status) {
+			ret = -ENOMEM;
 			goto fail_cmn_srng_cleanup;
+		}
 	}
 
 	for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++)




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
  2020-04-27 10:46 ` Wei Yongjun
  (?)
  (?)
@ 2020-05-04  8:53 ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-04  8:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: linux-wireless, kernel-janitors, ath11k, John Crispin

Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f76f750aeea4 ath11k: fix error return code in ath11k_dp_alloc()

-- 
https://patchwork.kernel.org/patch/11511849/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
  2020-04-27 10:46 ` Wei Yongjun
@ 2020-05-04  8:53   ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-04  8:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: John Crispin, ath11k, linux-wireless, kernel-janitors

Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f76f750aeea4 ath11k: fix error return code in ath11k_dp_alloc()

-- 
https://patchwork.kernel.org/patch/11511849/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc()
@ 2020-05-04  8:53   ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-04  8:53 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: John Crispin, Wei Yongjun, ath11k, linux-wireless,
	kernel-janitors

Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f76f750aeea4 ath11k: fix error return code in ath11k_dp_alloc()

-- 
https://patchwork.kernel.org/patch/11511849/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-04  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-27 10:46 [PATCH net-next] ath11k: fix error return code in ath11k_dp_alloc() Wei Yongjun
2020-04-27 10:46 ` Wei Yongjun
2020-04-27 10:46 ` Wei Yongjun
2020-05-04  8:53 ` Kalle Valo
2020-05-04  8:53 ` Kalle Valo
2020-05-04  8:53   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.