mmc: sdhci-of-arasan: Check return value of non-void funtions
[ Upstream commit 66bad6ed2204fdb78a0a8fb89d824397106a5471 ] At a couple of places, the return values of the non-void functions were not getting checked. This was reported by the coverity tool. Modify the code to check the return values of the same. Addresses-Coverity: ("check_return") Signed-off-by: Manish Narani <manish.narani@xilinx.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/1623753837-21035-5-git-send-email-manish.narani@xilinx.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a73bbfabfe
commit
4e773c5553
@ -192,7 +192,12 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)
|
|||||||
* through low speeds without power cycling.
|
* through low speeds without power cycling.
|
||||||
*/
|
*/
|
||||||
sdhci_set_clock(host, host->max_clk);
|
sdhci_set_clock(host, host->max_clk);
|
||||||
phy_power_on(sdhci_arasan->phy);
|
if (phy_power_on(sdhci_arasan->phy)) {
|
||||||
|
pr_err("%s: Cannot power on phy.\n",
|
||||||
|
mmc_hostname(host->mmc));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sdhci_arasan->is_phy_on = true;
|
sdhci_arasan->is_phy_on = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -228,7 +233,12 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)
|
|||||||
msleep(20);
|
msleep(20);
|
||||||
|
|
||||||
if (ctrl_phy) {
|
if (ctrl_phy) {
|
||||||
phy_power_on(sdhci_arasan->phy);
|
if (phy_power_on(sdhci_arasan->phy)) {
|
||||||
|
pr_err("%s: Cannot power on phy.\n",
|
||||||
|
mmc_hostname(host->mmc));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sdhci_arasan->is_phy_on = true;
|
sdhci_arasan->is_phy_on = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -416,7 +426,9 @@ static int sdhci_arasan_suspend(struct device *dev)
|
|||||||
ret = phy_power_off(sdhci_arasan->phy);
|
ret = phy_power_off(sdhci_arasan->phy);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Cannot power off phy.\n");
|
dev_err(dev, "Cannot power off phy.\n");
|
||||||
sdhci_resume_host(host);
|
if (sdhci_resume_host(host))
|
||||||
|
dev_err(dev, "Cannot resume host.\n");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
sdhci_arasan->is_phy_on = false;
|
sdhci_arasan->is_phy_on = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user