On 9/8/2026 12:42 PM, Ilias Apalodimas wrote:
On Sun Aug 23, 2026 at 10:47 PM EEST, Jan Kiszka wrote:
From: Jan Kiszka <[email protected]>
[...]

diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 698530088fe..ec16899f92e 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -319,7 +319,7 @@ struct mmc *find_mmc_device(int dev_num)

        if (ret) {
  #if !defined(CONFIG_XPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
-               printf("MMC Device %d not found\n", dev_num);
+               dev_dbg(dev, "MMC Device %d not found\n", dev_num);
'dev' might be unitiazed here on failures

Yes, good catch. On the failure path of blk_find_device(), 'dev'
is not guaranteed to be valid, so using it with dev_dbg() is wrong.
I think debug() is the right replacement rather than leaving printf(),
e.g.:
        debug("MMC Device %d not found\n", dev_num);



  #endif
                return NULL;
        }
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index 8f8ba34be71..573521842f6 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -45,7 +45,7 @@ struct mmc *find_mmc_device(int dev_num)
        }

  #if !defined(CONFIG_XPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
-       printf("MMC Device %d not found\n", dev_num);
+       dev_dbg(dev, "MMC Device %d not found\n", dev_num);
  #endif

Same for the legacy path, which has no 'dev' at all.

Thanks Ilias, you are right. Dropping my Reviewed-by until a fixed
version.

Reply via email to