power: io-domain: Don't printf sudev->name when get regulator failed

This patch fixed the following issue:

Stack:
       [< 00295020 >]  strnlen+0x10/0x28
       [< 002965b4 >]  vsnprintf_internal+0x61c/0xa84
       [< 00296a6c >]  vscnprintf+0x50/0x74
       [< 00296c58 >]  printf+0x94/0xb4
       [< 00263e04 >]  rockchip_iodomain_probe+0xcc/0x19c
       [< 0022e310 >]  device_probe+0x21c/0x268
       [< 0022f3e8 >]  uclass_get_device_tail+0x1c/0x40
       [< 0022f6dc >]  uclass_first_device+0x30/0x44
       [< 00263cdc >]  io_domain_init+0x2c/0x50
       [< 00202da8 >]  board_init+0xb4/0xc4
       [< 0027a480 >]  initcall_run_list+0x58/0x94
       [< 00214fbc >]  board_init_r+0x20/0x24
       [< 00201b24 >]  relocation_return+0x4/0x0

Change-Id: I1afc2613a1dba32e7f9c6ad2165e80853d421187
Signed-off-by: David Wu <david.wu@rock-chips.com>
This commit is contained in:
David Wu 2019-11-27 10:22:07 +08:00 committed by Jianhong Chen
parent 27d36fbda0
commit 61ab4d721f
1 changed files with 2 additions and 2 deletions

View File

@ -485,9 +485,9 @@ static struct udevice *of_get_regulator(ofnode node, const char *supply)
snode = ofnode_get_by_phandle(phandle);
ret = regulator_get_by_devname(snode.np->name, &sudev);
if (ret) {
printf("%s: %s: Get supply(%s) failed, ret=%d",
printf("%s: Get (%s) regulator: %s failed, ret=%d\n",
__func__,
sudev->name, snode.np->full_name, ret);
sname, snode.np->full_name, ret);
return NULL;
}
debug("IO-DOMAIN: supply: %s\n", snode.np->full_name);