diff mbox series

[U-Boot] mmc: fix return value check condition

Message ID 20180305082040.15714-1-peng.fan@nxp.com
State Accepted
Delegated to: Jaehoon Chung
Headers show
Series [U-Boot] mmc: fix return value check condition | expand

Commit Message

Peng Fan March 5, 2018, 8:20 a.m. UTC
sd_read_ssr returns 0, means no error.
Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung March 8, 2018, 2:13 a.m. UTC | #1
Hi Peng,

On 03/05/2018 05:20 PM, Peng Fan wrote:
> sd_read_ssr returns 0, means no error.
> Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>

Will apply your patch. I have a problem about firewall exception for git.denx.de.
After fixing my problem, re-send the email about applying a patch.

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index c930893300..92ea78b8af 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1689,7 +1689,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
>  
>  #if CONFIG_IS_ENABLED(MMC_WRITE)
>  				err = sd_read_ssr(mmc);
> -				if (!err)
> +				if (err)
>  					pr_warn("unable to read ssr\n");
>  #endif
>  				if (!err)
>
Jaehoon Chung April 26, 2018, 10:30 a.m. UTC | #2
Hi,

On 03/05/2018 05:20 PM, Peng Fan wrote:
> sd_read_ssr returns 0, means no error.
> Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")

Sorry for late. Applied to u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index c930893300..92ea78b8af 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1689,7 +1689,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
>  
>  #if CONFIG_IS_ENABLED(MMC_WRITE)
>  				err = sd_read_ssr(mmc);
> -				if (!err)
> +				if (err)
>  					pr_warn("unable to read ssr\n");
>  #endif
>  				if (!err)
>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index c930893300..92ea78b8af 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1689,7 +1689,7 @@  static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
 
 #if CONFIG_IS_ENABLED(MMC_WRITE)
 				err = sd_read_ssr(mmc);
-				if (!err)
+				if (err)
 					pr_warn("unable to read ssr\n");
 #endif
 				if (!err)