summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhilash K V <abhilash.kv@ti.com>2011-08-23 05:05:57 +0200
committerDavid S. Miller <davem@davemloft.net>2011-08-26 18:48:24 +0200
commit86ad47fff97a9e416aadedfe68909b2d9143dc42 (patch)
treefc88c4921b561b734115f30d46605e1ce56a0e57 /drivers
parentcan: ti_hecc: Fix unintialized variable (diff)
downloadlinux-86ad47fff97a9e416aadedfe68909b2d9143dc42.tar.xz
linux-86ad47fff97a9e416aadedfe68909b2d9143dc42.zip
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: Anant Gole <anantgole@ti.com> Signed-off-by: Abhilash K V <abhilash.kv@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/ti_hecc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 0b19a17d8178..a81249246ece 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -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);