]> git.hungrycats.org Git - linux/commitdiff
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>
Thu, 4 Oct 2018 00:01:42 +0000 (17:01 -0700)
[ Upstream commit c5fae4f4fd28189b1062fb8ef7b21fec37cb8b17 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5208/sd.c

index b0bbb36f89889003b4972f5e84893d17f50e3c33..9e63bdf2afe7bb1d4fcea8cc323dea82aea76fb2 100644 (file)
@@ -4976,7 +4976,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) {
                        rtsx_trace(chip);
                        goto SD_Execute_Write_Cmd_Failed;