From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0130.outbound.protection.outlook.com ([104.47.42.130]:60384 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728718AbeIQI2t (ORCPT ); Mon, 17 Sep 2018 04:28:49 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Colin Ian King , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.14 06/87] staging: rts5208: fix missing error check on call to rtsx_write_register Date: Mon, 17 Sep 2018 03:02:28 +0000 Message-ID: <20180917030220.245686-6-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Colin Ian King [ 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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/rts5208/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index 4033a2cf7ac9..d98d5fe25a17 100644 --- a/drivers/staging/rts5208/sd.c +++ b/drivers/staging/rts5208/sd.c @@ -5002,7 +5002,7 @@ int sd_execute_write_data(struct scsi_cmnd *srb, stru= ct rtsx_chip *chip) goto sd_execute_write_cmd_failed; } =20 - rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00); + retval =3D rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00); if (retval !=3D STATUS_SUCCESS) { rtsx_trace(chip); goto sd_execute_write_cmd_failed; --=20 2.17.1