Skip to content
Snippets Groups Projects
Commit ab8e99d2 authored by Sebastian Siewior's avatar Sebastian Siewior Committed by David S. Miller
Browse files

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5b248dd
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment