fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
PATCH 1/1 fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'.
Eliminate the follow smatch warning:
drivers/fpga/machxo2-spi.c:341 machxo2_write_complete() warn: missing error code 'ret'.
Reported-by Abaci Robot <[email protected]>
Fixes 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2
support")
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/fpga/machxo2-spi.c | 1 + 1 file changed, 1 insertion(+)
drivers/fpga/machxo2-spi.c +1 -0
@@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr,break ;if (++refreshloop ==MACHXO2_MAX_REFRESH_LOOP ) {machxo2_cleanup (mgr); + ret = -EINVAL ; goto fail; } }while (1 );
Signature · 1 line
1.8.3.1
Moritz Fischer
AppliedQuoted 4 lines · Jiapeng Chong
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'ret'.
Quoted 8 lines
Eliminate the follow smatch warning:
drivers/fpga/machxo2-spi.c:341machxo2_write_complete()warn: missing error code 'ret'.Reported-by Abaci Robot <[email protected]>Fixes 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2support")
This shouldn't line-break.
Quoted 18 lines
Signed-off-by Jiapeng Chong <[email protected]>--- drivers/fpga/machxo2-spi.c | 1 + 1 file changed, 1 insertion(+)drivers/fpga/machxo2-spi.c +1
-1@@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr,break ;if (++refreshloop ==MACHXO2_MAX_REFRESH_LOOP ) {machxo2_cleanup (mgr); + ret = -EINVAL ; goto fail; } }while (1 ); --
Quoted 2 lines
1.8.3.1
Applied to 'fixes' with modifications to commit message,
Moritz