From: Peng Fan Date: Tue, 22 Oct 2019 03:31:08 +0000 (+0000) Subject: clk: show more error info when uclass_get_device_by_name X-Git-Tag: v2020.04-rc1~3^2~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5dcac2b9b3bd14748b68cadd3f855369c8926f05;p=oweals%2Fu-boot.git clk: show more error info when uclass_get_device_by_name It will ease debug when uclass_get_device_by_name failed with more error info printed out. Signed-off-by: Peng Fan --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 1cf9987f6c..4c477a488e 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -20,8 +20,10 @@ int clk_register(struct clk *clk, const char *drv_name, int ret; ret = uclass_get_device_by_name(UCLASS_CLK, parent_name, &parent); - if (ret) - printf("%s: UCLASS parent: 0x%p\n", __func__, parent); + if (ret) { + printf("%s: name: %s parent: %s [0x%p]\n", + __func__, name, parent->name, parent); + } debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, parent->name, parent);