ide: remove duplicated assignment to 'cursg'
authorColin Ian King <colin.king@canonical.com>
Tue, 16 Jan 2018 17:54:22 +0000 (17:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 20:01:09 +0000 (15:01 -0500)
Pointer cursg is initialized to cmd->cursg and again re-assigned the
same value a few lines later, hence the second assignment is redundant
and can be removed.

Cleans up clang warning:
drivers/ide/ide-taskfile.c:229:22: warning: Value stored to 'cursg'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/ide-taskfile.c

index 4efe4c6..abe0822 100644 (file)
@@ -232,7 +232,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
        unsigned int offset;
        u8 *buf;
 
-       cursg = cmd->cursg;
        if (cursg == NULL)
                cursg = cmd->cursg = sg;