netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] et131x: check return value of dma_alloc_coherent
@ 2016-02-16  2:23 Insu Yun
  2016-02-18  4:32 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Insu Yun @ 2016-02-16  2:23 UTC (permalink / raw)
  To: mark.einon, andrew, davem, f.fainelli, netdev, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

For error handling, dma_alloc_coherent's return value
needs to be checked, not argument.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/net/ethernet/agere/et131x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et131x.c
index 3f3bcbe..0907ab6 100644
--- a/drivers/net/ethernet/agere/et131x.c
+++ b/drivers/net/ethernet/agere/et131x.c
@@ -2380,7 +2380,7 @@ static int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter)
 						    sizeof(u32),
 						    &tx_ring->tx_status_pa,
 						    GFP_KERNEL);
-	if (!tx_ring->tx_status_pa) {
+	if (!tx_ring->tx_status) {
 		dev_err(&adapter->pdev->dev,
 			"Cannot alloc memory for Tx status block\n");
 		return -ENOMEM;
-- 
1.9.1

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

* Re: [PATCH] et131x: check return value of dma_alloc_coherent
  2016-02-16  2:23 [PATCH] et131x: check return value of dma_alloc_coherent Insu Yun
@ 2016-02-18  4:32 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-18  4:32 UTC (permalink / raw)
  To: wuninsu
  Cc: mark.einon, andrew, f.fainelli, netdev, linux-kernel, taesoo,
	yeongjin.jang, insu, changwoo

From: Insu Yun <wuninsu@gmail.com>
Date: Mon, 15 Feb 2016 21:23:47 -0500

> For error handling, dma_alloc_coherent's return value
> needs to be checked, not argument.
> 
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2016-02-18  4:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16  2:23 [PATCH] et131x: check return value of dma_alloc_coherent Insu Yun
2016-02-18  4:32 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).