2020-09-21 13:13:03

by Qinglang Miao

[permalink] [raw]
Subject: [PATCH -next] spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()

Simplify the return expression.

Signed-off-by: Qinglang Miao <[email protected]>
---
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


2020-09-22 01:01:53

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH -next] spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()

On Mon, 21 Sep 2020 21:11:06 +0800, Qinglang Miao wrote:
> Simplify the return expression.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: npcm-fiu: simplify the return expression of npcm_fiu_probe()
commit: 4c3a14fbc05a09fc369fb68a86cdbf6f441a29f2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark