diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-08-08 09:33:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-09 12:18:08 +0300 |
commit | 94c0a6fbd5cfc34d3ce5fea5867123402cdc8794 (patch) | |
tree | 2533c8d71bbfd6bd27d72573b32a475ba625eb49 /drivers/net/wwan | |
parent | 403fa18691b7370ad7508292769824ba298c184b (diff) | |
download | linux-94c0a6fbd5cfc34d3ce5fea5867123402cdc8794.tar.xz |
wwan: mhi: Fix missing spin_lock_init() in mhi_mbim_probe()
The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.
Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wwan')
-rw-r--r-- | drivers/net/wwan/mhi_wwan_mbim.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c index f37232fb29c0..377529bbf124 100644 --- a/drivers/net/wwan/mhi_wwan_mbim.c +++ b/drivers/net/wwan/mhi_wwan_mbim.c @@ -601,6 +601,7 @@ static int mhi_mbim_probe(struct mhi_device *mhi_dev, const struct mhi_device_id if (!mbim) return -ENOMEM; + spin_lock_init(&mbim->tx_lock); dev_set_drvdata(&mhi_dev->dev, mbim); mbim->mdev = mhi_dev; mbim->mru = mhi_dev->mhi_cntrl->mru ? mhi_dev->mhi_cntrl->mru : MHI_DEFAULT_MRU; |