mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume()
[ Upstream commitae94c49527
] Add clk_disable_unprepare() on error path in marvell_nfc_resume(). Fixes:bd9c3f9b3c
("mtd: rawnand: marvell: add suspend and resume hooks") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210601125814.3260364-1-yangyingliang@huawei.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b1d1cafd60
commit
35a4e0aee8
1 changed files with 3 additions and 1 deletions
|
@ -2980,8 +2980,10 @@ static int __maybe_unused marvell_nfc_resume(struct device *dev)
|
|||
return ret;
|
||||
|
||||
ret = clk_prepare_enable(nfc->reg_clk);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
clk_disable_unprepare(nfc->core_clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset nfc->selected_chip so the next command will cause the timing
|
||||
|
|
Loading…
Reference in a new issue