diff options
author | Mark Brown <broonie@kernel.org> | 2020-12-11 18:49:01 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-11 18:49:01 +0100 |
commit | 3e98a021cc85e7d52acdd1eae8a988e975ec5bf9 (patch) | |
tree | cecfac58b9550a602555a02a9d583ed0f3378b38 /drivers/spi/spi-npcm-fiu.c | |
parent | Merge remote-tracking branch 'spi/for-5.10' into spi-linus (diff) | |
parent | spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors (diff) | |
download | linux-3e98a021cc85e7d52acdd1eae8a988e975ec5bf9.tar.xz linux-3e98a021cc85e7d52acdd1eae8a988e975ec5bf9.zip |
Merge remote-tracking branch 'spi/for-5.11' into spi-next
Diffstat (limited to 'drivers/spi/spi-npcm-fiu.c')
-rw-r--r-- | drivers/spi/spi-npcm-fiu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index 1cb9329de945..b62471ab6d7f 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -677,7 +677,7 @@ static int npcm_fiu_probe(struct platform_device *pdev) struct npcm_fiu_spi *fiu; void __iomem *regbase; struct resource *res; - int id; + int id, ret; ctrl = devm_spi_alloc_master(dev, sizeof(*fiu)); if (!ctrl) @@ -735,7 +735,11 @@ static int npcm_fiu_probe(struct platform_device *pdev) ctrl->num_chipselect = fiu->info->max_cs; ctrl->dev.of_node = dev->of_node; - return devm_spi_register_master(dev, ctrl); + ret = devm_spi_register_master(dev, ctrl); + if (ret) + clk_disable_unprepare(fiu->clk); + + return ret; } static int npcm_fiu_remove(struct platform_device *pdev) |