net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 16 Aug 2021 13:14:04 +0000 (21:14 +0800)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:37:28 +0000 (08:37 -0400)
commitafe3fbc1db2fcaa0d18bf5603c4c8b250bc32fad
treeb025777f8d9104df123f7087ee1de774e7e4faf8
parentde9171c1d9a5c2c4c5ec5e64f420681f178152fa
net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32

[ Upstream commit 0a298d133893c72c96e2156ed7cb0f0c4a306a3e ]

qlcnic_83xx_unlock_flash() is called on all paths after we call
qlcnic_83xx_lock_flash(), except for one error path on failure
of QLCRD32(), which may cause a deadlock. This bug is suggested
by a static analysis tool, please advise.

Fixes: 81d0aeb0a4fff ("qlcnic: flash template based firmware reset recovery")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20210816131405.24024-1-dinghao.liu@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c