From: Michael Walle Date: Wed, 23 Feb 2022 13:43:57 +0000 (+0100) Subject: mtd: spi-nor: slightly change code style in spi_nor_sr_ready() X-Git-Tag: v6.1-rc5~1722^2~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9d663a2a0193c82e4b4ffe066317ce16fc345e8;p=platform%2Fkernel%2Flinux-starfive.git mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Now that there is almost no special case code left in spi_nor_sr_ready(), the return check looks odd. Move the function call closer to the return code checking. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220223134358.1914798-32-michael@walle.cc --- diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index f5a2f37..9014008 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -563,8 +563,9 @@ int spi_nor_write_ear(struct spi_nor *nor, u8 ear) */ int spi_nor_sr_ready(struct spi_nor *nor) { - int ret = spi_nor_read_sr(nor, nor->bouncebuf); + int ret; + ret = spi_nor_read_sr(nor, nor->bouncebuf); if (ret) return ret;