diff mbox series

mmc: core: Remove redundant null check

Message ID 20250319203642.778016-1-avri.altman@sandisk.com
State New
Headers show
Series mmc: core: Remove redundant null check | expand

Commit Message

Avri Altman March 19, 2025, 8:36 p.m. UTC
This change removes a redundant null check found by Smatch.

Fixes: 737d220bb2be ("mmc: core: Add open-ended Ext memory addressing")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-mmc/345be6cd-f2f3-472e-a897-ca4b7c4cf826@stanley.mountain/
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
---
 drivers/mmc/core/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson March 20, 2025, 2:16 p.m. UTC | #1
On Wed, 19 Mar 2025 at 21:40, Avri Altman <avri.altman@sandisk.com> wrote:
>
> This change removes a redundant null check found by Smatch.
>
> Fixes: 737d220bb2be ("mmc: core: Add open-ended Ext memory addressing")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/linux-mmc/345be6cd-f2f3-472e-a897-ca4b7c4cf826@stanley.mountain/
> Signed-off-by: Avri Altman <avri.altman@sandisk.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 5241528f8b90..ce08e0ea7fc1 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -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
>
diff mbox series

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 5241528f8b90..ce08e0ea7fc1 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -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);