diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 21:11:06 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-22 01:04:19 +0100 |
commit | 4c3a14fbc05a09fc369fb68a86cdbf6f441a29f2 (patch) | |
tree | 4089344121658e837f9b155f00571564504a80c5 /drivers/spi | |
parent | ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b (diff) |
spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Link: https://lore.kernel.org/r/20200921131106.93228-1-miaoqinglang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-npcm-fiu.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index 9468e71f03ad..341f7cffeaac 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -677,7 +677,6 @@ static int npcm_fiu_probe(struct platform_device *pdev) struct npcm_fiu_spi *fiu; void __iomem *regbase; struct resource *res; - int ret; int id; ctrl = spi_alloc_master(dev, sizeof(*fiu)); @@ -736,11 +735,7 @@ static int npcm_fiu_probe(struct platform_device *pdev) ctrl->num_chipselect = fiu->info->max_cs; ctrl->dev.of_node = dev->of_node; - ret = devm_spi_register_master(dev, ctrl); - if (ret) - return ret; - - return 0; + return devm_spi_register_master(dev, ctrl); } static int npcm_fiu_remove(struct platform_device *pdev) |