staging: mt7621-mmc: Remove redundant opcode check
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Sat, 7 Apr 2018 08:16:25 +0000 (10:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:36:31 +0000 (15:36 +0200)
The opcode check in msdc_command_start is redundant in case of
MMC_SET_RELATIVE_ADDR, this is 3 like SD_SEND_RELATIVE_ADDR, so the
second check can be removed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c

index feebeed..7f0fcf3 100644 (file)
@@ -875,7 +875,7 @@ static unsigned int msdc_command_start(struct msdc_host   *host,
         */
        if (opcode == MMC_SEND_OP_COND || opcode == SD_APP_OP_COND) {
                resp = RESP_R3;
-       } else if (opcode == MMC_SET_RELATIVE_ADDR || opcode == SD_SEND_RELATIVE_ADDR) {
+       } else if (opcode == MMC_SET_RELATIVE_ADDR) {
                resp = (mmc_cmd_type(cmd) == MMC_CMD_BCR) ? RESP_R6 : RESP_R1;
        } else if (opcode == MMC_FAST_IO) {
                resp = RESP_R4;