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

Commit 86ad47ff authored by Abhilash K V's avatar Abhilash K V Committed by David S. Miller
Browse files

can: ti_hecc: Fix uninitialized spinlock in probe



In ti_hecc_probe(), the spinlock  priv->mbx_lock is not
inited, causing a spinlock lockup BUG.

Acked-by: default avatarAnant Gole <anantgole@ti.com>
Signed-off-by: default avatarAbhilash K V <abhilash.kv@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f288cc5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -923,6 +923,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
	priv->can.do_get_state = ti_hecc_get_state;
	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;

	spin_lock_init(&priv->mbx_lock);
	ndev->irq = irq->start;
	ndev->flags |= IFF_ECHO;
	platform_set_drvdata(pdev, ndev);