mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-10-22 23:23:03 +02:00
LF-13148 spi: spi-nxp-fspi: fix the unchecked return value
Check the return value of nxp_fspi_clk_prep_enable(). And for nxp_fspi_clk_disable_unprep(), no need to return value. Reported by Coverity, ID=20813360 Reviewed-by: Han Xu <han.xu@nxp.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
This commit is contained in:
parent
f1bcbacde1
commit
e790054d50
|
@ -643,15 +643,15 @@ static int nxp_fspi_clk_prep_enable(struct nxp_fspi *f)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int nxp_fspi_clk_disable_unprep(struct nxp_fspi *f)
|
||||
static void nxp_fspi_clk_disable_unprep(struct nxp_fspi *f)
|
||||
{
|
||||
if (is_acpi_node(dev_fwnode(f->dev)))
|
||||
return 0;
|
||||
return;
|
||||
|
||||
clk_disable_unprepare(f->clk);
|
||||
clk_disable_unprepare(f->clk_en);
|
||||
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static void nxp_fspi_dll_calibration(struct nxp_fspi *f)
|
||||
|
@ -1490,8 +1490,11 @@ static int nxp_fspi_runtime_suspend(struct device *dev)
|
|||
static int nxp_fspi_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct nxp_fspi *f = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
nxp_fspi_clk_prep_enable(f);
|
||||
ret = nxp_fspi_clk_prep_enable(f);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (nxp_fspi_initialized(f) && nxp_fspi_need_reinit(f))
|
||||
nxp_fspi_default_setup(f);
|
||||
|
|
Loading…
Reference in New Issue
Block a user