]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:11:06 +0000 (21:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:57:56 +0000 (15:57 +0100)
commit 4c3a14fbc05a09fc369fb68a86cdbf6f441a29f2 upstream

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>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-npcm-fiu.c

index 5ed7c9e017fb18286222d81983230750100c2ad4..561c68329133b0adcf7a56270e3ba157e029f7e7 100644 (file)
@@ -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 = devm_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)