bus: mhi: core: Remove double locking from mhi_driver_remove()
authorBhaumik Bhatt <bbhatt@codeaurora.org>
Thu, 15 Oct 2020 18:47:51 +0000 (11:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:15 +0000 (11:53 +0100)
commit417602ef3f4a81116c1a7742eeb9183f9b2729d4
treed73de56d14d2e9cf32e0916ffb8ab56728092478
parentd2fd75615c2fc779a20b870e3351d995b2a8adba
bus: mhi: core: Remove double locking from mhi_driver_remove()

[ Upstream commit 9b627c25e70816a5e1dca940444b5029065b4d60 ]

There is double acquisition of the pm_lock from mhi_driver_remove()
function. Remove the read_lock_bh/read_unlock_bh calls for pm_lock
taken during a call to mhi_device_put() as the lock is acquired
within the function already. This will help avoid a potential
kernel panic.

Fixes: 189ff97cca53 ("bus: mhi: core: Add support for data transfer")
Reported-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/mhi/core/init.c