Skip to content

Commit e9d663a

Browse files
mwalleambarus
authored andcommitted
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
1 parent e8fd3b4 commit e9d663a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/mtd/spi-nor/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,9 @@ int spi_nor_write_ear(struct spi_nor *nor, u8 ear)
563563
*/
564564
int spi_nor_sr_ready(struct spi_nor *nor)
565565
{
566-
int ret = spi_nor_read_sr(nor, nor->bouncebuf);
566+
int ret;
567567

568+
ret = spi_nor_read_sr(nor, nor->bouncebuf);
568569
if (ret)
569570
return ret;
570571

0 commit comments

Comments
 (0)