diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-04-23 22:03:27 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-25 15:54:16 +0200 |
commit | e0f2e9ce7e4579ec71b63c39609db1316f0ad1be (patch) | |
tree | 54800504cde257e87bce7b2f18ade1440c20372b /drivers/staging/wilc1000/wilc_spi.c | |
parent | a8e11a6a65c4f0bd0f98d0a5c000f2908b4b7de9 (diff) |
staging: wilc1000: remove the use of goto label in spi_cmd_complete()
In spi_cmd_complete() remove the use of goto label '_error_'. Changes
were done to avoid the use of '_' in label name.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_spi.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_spi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 6b392c946a6f..3e3c7742ea79 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -527,8 +527,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, if (wilc_spi_rx(wilc, &b[ix], nbytes)) { dev_err(&spi->dev, "Failed block read, bus err\n"); - result = N_FAIL; - goto _error_; + return N_FAIL; } /* @@ -537,8 +536,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, if (!g_spi.crc_off && wilc_spi_rx(wilc, crc, 2)) { dev_err(&spi->dev, "Failed block crc read, bus err\n"); - result = N_FAIL; - goto _error_; + return N_FAIL; } ix += nbytes; @@ -604,7 +602,6 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, sz -= nbytes; } } -_error_: return result; } |