Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}