1
0
Fork 0

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>
5bit-waveforms
Sebastian Siewior 2013-06-17 19:31:52 +02:00 committed by David S. Miller
parent c5b248dd05
commit ab8e99d276
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}