staging: rts5208: fix missing error check on call to rtsx_write_register
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Jul 2018 13:27:35 +0000 (14:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2018 15:37:31 +0000 (17:37 +0200)
Currently the check on error return from the call to rtsx_write_register
is checking the error status from the previous call. Fix this by adding
in the missing assignment of retval.

Detected by CoverityScan, CID#709877

Fixes: fa590c222fba ("staging: rts5208: add support for rts5208 and rts5288")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5208/sd.c

index f2778abf10c081a6ab91e1a14d87f128a6b14e49..e7efa34195c7b11e4ef6d251a836bd19715302af 100644 (file)
@@ -4690,7 +4690,7 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip)
                        goto sd_execute_write_cmd_failed;
                }
 
-               rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00);
+               retval = rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00);
                if (retval != STATUS_SUCCESS) {
                        goto sd_execute_write_cmd_failed;
                }