mmc: fix return value check condition
authorPeng Fan <[email protected]>
Mon, 5 Mar 2018 08:20:40 +0000 (16:20 +0800)
committerJaehoon Chung <[email protected]>
Wed, 2 May 2018 01:57:43 +0000 (10:57 +0900)
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 <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Jean-Jacques Hiblot <[email protected]>
drivers/mmc/mmc.c

index f72b80c70484062e92fe9ff3df6fb8b951f70e61..fe7c0b39ac17433ff127738efeb4afa21983f3b2 100644 (file)
@@ -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)