[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200921131106.93228-1-miaoqinglang@huawei.com>
Date: Mon, 21 Sep 2020 21:11:06 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Avi Fishman <avifishman70@...il.com>,
Tomer Maimon <tmaimon77@...il.com>,
Tali Perry <tali.perry1@...il.com>,
Patrick Venture <venture@...gle.com>,
Nancy Yuen <yuenn@...gle.com>,
Benjamin Fair <benjaminfair@...gle.com>,
"Mark Brown" <broonie@...nel.org>
CC: <openbmc@...ts.ozlabs.org>, <linux-spi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH -next] spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
drivers/spi/spi-npcm-fiu.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c
index 9468e71f0..341f7cffe 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)
--
2.23.0
Powered by blists - more mailing lists