mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
mmc: davinci_mmc: Handle error for clk_enable
[ Upstream commit09e7af76db
] As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes:bbce5802af
("davinci: mmc: updates to suspend/resume implementation") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Link: https://lore.kernel.org/r/20220308071415.1093393-1-jiasheng@iscas.ac.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6798c3e19f
commit
ddea8cdeb2
1 changed files with 5 additions and 1 deletions
|
@ -1375,8 +1375,12 @@ static int davinci_mmcsd_suspend(struct device *dev)
|
||||||
static int davinci_mmcsd_resume(struct device *dev)
|
static int davinci_mmcsd_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mmc_davinci_host *host = dev_get_drvdata(dev);
|
struct mmc_davinci_host *host = dev_get_drvdata(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = clk_enable(host->clk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
clk_enable(host->clk);
|
|
||||||
mmc_davinci_reset_ctrl(host, 0);
|
mmc_davinci_reset_ctrl(host, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue