mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
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
This commit is contained in:
parent
e8fd3b4b26
commit
e9d663a2a0
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue