Commit f04444fa8a1c8c99fad5d8781324cff27892b9b6

Authored by Peng Fan
1 parent b1d2ec2d64

MLK-14708 mmc: fsl_esdhc: fix wrong usage device_get_supply_regulator

Fix wrong usage of device_get_supply_regulator.
device_get_supply_regulator returns 0 on success.

Signed-off-by: Peng Fan <peng.fan@nxp.com>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

drivers/mmc/fsl_esdhc.c
... ... @@ -1028,9 +1028,13 @@
1028 1028 #endif
1029 1029 }
1030 1030  
  1031 + priv->vs18_enable = 0;
  1032 +
1031 1033 #ifdef CONFIG_DM_REGULATOR
1032 1034 ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
1033 1035 if (ret) {
  1036 + dev_dbg(dev, "no vqmmc supply\n");
  1037 + } else {
1034 1038 if (regulator_get_value(vqmmc_dev) == 1800000)
1035 1039 priv->vs18_enable = 1;
1036 1040 }