Skip to content

Commit c6ecdcb

Browse files
wb-zjp846396gregkh
authored andcommitted
fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
[ Upstream commit a1e4470 ] 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'. [mdf@kernel.org: Reworded commit message] Fixes: 88fb3a0 ("fpga: lattice machxo2: Add Lattice MachXO2 support") Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5c6bfde commit c6ecdcb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/fpga/machxo2-spi.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr,
338338
break;
339339
if (++refreshloop == MACHXO2_MAX_REFRESH_LOOP) {
340340
machxo2_cleanup(mgr);
341+
ret = -EINVAL;
341342
goto fail;
342343
}
343344
} while (1);

0 commit comments

Comments
 (0)