netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: cpsw: check for cpts pointer after its allocation
@ 2013-06-17 17:31 Sebastian Andrzej Siewior
  2013-06-17 23:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-06-17 17:31 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sebastian Andrzej Siewior, Mugunthan V N

after priv->cpts got allocated then this pointer should check to determine
if the allocation succeeded or not.

Cc: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 5143552..cc5358a 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1682,7 +1682,7 @@ static int cpsw_probe(struct platform_device *pdev)
 	priv->rx_packet_max = max(rx_packet_max, 128);
 	priv->cpts = devm_kzalloc(&pdev->dev, sizeof(struct cpts), GFP_KERNEL);
 	priv->irq_enabled = true;
-	if (!ndev) {
+	if (!priv->cpts) {
 		pr_err("error allocating cpts\n");
 		goto clean_ndev_ret;
 	}
-- 
1.8.3.1

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

* Re: [PATCH] net: cpsw: check for cpts pointer after its allocation
  2013-06-17 17:31 [PATCH] net: cpsw: check for cpts pointer after its allocation Sebastian Andrzej Siewior
@ 2013-06-17 23:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-06-17 23:26 UTC (permalink / raw)
  To: bigeasy; +Cc: netdev, mugunthanvnm

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 17 Jun 2013 19:31:52 +0200

> after priv->cpts got allocated then this pointer should check to determine
> if the allocation succeeded or not.
> 
> Cc: Mugunthan V N <mugunthanvnm@ti.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Applied, thanks.

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

end of thread, other threads:[~2013-06-17 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 17:31 [PATCH] net: cpsw: check for cpts pointer after its allocation Sebastian Andrzej Siewior
2013-06-17 23:26 ` 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).