summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2022-02-23 14:43:57 +0100
committerTudor Ambarus <tudor.ambarus@microchip.com>2022-02-25 17:13:13 +0100
commite9d663a2a0193c82e4b4ffe066317ce16fc345e8 (patch)
tree4ef1f418070e5b27d6734739bd0ab8b2571fdb0a
parentmtd: spi-nor: spansion: rename vendor specific functions and defines (diff)
downloadlinux-e9d663a2a0193c82e4b4ffe066317ce16fc345e8.tar.xz
linux-e9d663a2a0193c82e4b4ffe066317ce16fc345e8.zip
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 <michael@walle.cc> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20220223134358.1914798-32-michael@walle.cc
-rw-r--r--drivers/mtd/spi-nor/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index f5a2f37d140e..9014008e60b3 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;