diff options
author | Doug Brown <[email protected]> | 2024-07-14 08:55:11 -0700 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2024-08-26 13:01:49 +0200 |
commit | 3af5a1e7be84e0a5d6635dbedb13bd1ce4161414 (patch) | |
tree | 5b31772f3ed47e8512dccf85e1e3201aaca6d242 | |
parent | addc9ecb9ddb3fe77be3979cce021ad07442c1fc (diff) |
mmc: sdhci-pxav2: Remove unnecessary null pointer check
There is no need to check for a null mrq->cmd in pxav1_request_done.
mmc_request_done already assumes it's not null, and it's always called
in this path by every SDHCI driver. This was caught by Smatch.
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Doug Brown <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r-- | drivers/mmc/host/sdhci-pxav2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index b75cbea88b40..7b957f6d5588 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -126,7 +126,7 @@ static void pxav1_request_done(struct sdhci_host *host, struct mmc_request *mrq) struct sdhci_pxav2_host *pxav2_host; /* If this is an SDIO command, perform errata workaround for silicon bug */ - if (mrq->cmd && !mrq->cmd->error && + if (!mrq->cmd->error && (mrq->cmd->opcode == SD_IO_RW_DIRECT || mrq->cmd->opcode == SD_IO_RW_EXTENDED)) { /* Reset data port */ |