diff options
author | Sebastian Siewior <bigeasy@linutronix.de> | 2013-06-17 19:31:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-17 16:26:07 -0700 |
commit | ab8e99d276d4b72d1532bda4423b14c9e2ce053c (patch) | |
tree | a0d932f01b664d964f06828504aadc0649bf70a5 | |
parent | c5b248dd051ee87e49307e576eb8d022722cf9a3 (diff) |
net: cpsw: check for cpts pointer after its allocation
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 21a5b291b4b..2fd69db3c09 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1679,7 +1679,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; } |