aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rts5208
diff options
context:
space:
mode:
authorGravatar Colin Ian King <colin.king@canonical.com> 2017-02-02 12:12:01 +0000
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2017-02-03 13:01:36 +0100
commit041b67b389fc0118015e5adc62725d89127dcc71 (patch)
treec380ff260d1dc2be43a62f51b3f3632877d55c8a /drivers/staging/rts5208
parentstaging: fbtft: change 'gamma' array to u32 (diff)
downloadlinux-041b67b389fc0118015e5adc62725d89127dcc71.tar.gz
linux-041b67b389fc0118015e5adc62725d89127dcc71.tar.bz2
linux-041b67b389fc0118015e5adc62725d89127dcc71.zip
staging: rts5208: remove redundant retval status check
The retval status checks in the proceeding do loop return out of function ms_read_attritbute_info if there is an error condition, thus we never reach the end of the loop with retval failed status. Therefore, the retval status check at end of the do loop is redundant and can be removed. Detected with CoverityScan, CID#143000 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208')
-rw-r--r--drivers/staging/rts5208/ms.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index 28d56c5d1449..806c12180714 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -1108,12 +1108,6 @@ static int ms_read_attribute_info(struct rtsx_chip *chip)
i++;
} while (i < 1024);
- if (retval != STATUS_SUCCESS) {
- kfree(buf);
- rtsx_trace(chip);
- return STATUS_FAIL;
- }
-
if ((buf[0] != 0xa5) && (buf[1] != 0xc3)) {
/* Signature code is wrong */
kfree(buf);