Skip to contentSkip to conversation

mmc: core: Remove redundant null check

PATCH In review Avri Altman 2 participants 2 messages Mar 19, 2025 – Mar 20, 2025 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: core: Remove redundant null check

This change removes a redundant null check found by Smatch.

Fixes 737d220bb2be ("mmc: core: Add open-ended Ext memory addressing")
---
 drivers/mmc/core/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/core.c +1 -1
index 5241528f8b90..ce08e0ea7fc1 100644
@@ -335,7 +335,7 @@ int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
 {
 	int err;
 
-	if (mrq->cmd && mrq->cmd->has_ext_addr)
+	if (mrq->cmd->has_ext_addr)
 		mmc_send_ext_addr(host, mrq->cmd->ext_addr);
 
 	init_completion(&mrq->cmd_completion);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Avri Altman

This change removes a redundant null check found by Smatch.

Fixes 737d220bb2be ("mmc: core: Add open-ended Ext memory addressing")

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/core/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/core.c +1 -2
index 5241528f8b90..ce08e0ea7fc1 100644
@@ -335,7 +335,7 @@ int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
 {
        int err;
 
-       if (mrq->cmd && mrq->cmd->has_ext_addr)
+       if (mrq->cmd->has_ext_addr)
                mmc_send_ext_addr(host, mrq->cmd->ext_addr);
 
        init_completion(&mrq->cmd_completion);
--

2.25.1