arm: mach-k3: am642_init: Fix the length of new property value in fdt_find_and_setprop()

In function fdt_find_and_setprop(), argument "len" denotes the length of
the new property value only, not accumulated sum of lengths of property
name and property value. Therefore, fix it to the correct length of string
"host", which is 4.

Fixes: e130468298 ("arm: mach-k3: am642_init: Do USB fixups to facilitate host and device boot modes")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
This commit is contained in:
Aswath Govindraju 2021-04-12 16:13:39 +05:30 committed by Praneeth Bajjuri
parent 73c3310f45
commit d0d92256cb
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ static int fixup_usb_boot(const void *fdt_blob)
*/
ret = fdt_find_and_setprop((void *)fdt_blob,
"/bus@f4000/cdns-usb@f900000/usb@f400000",
"dr_mode", "host", 11, 0);
"dr_mode", "host", 4, 0);
if (ret)
printf("%s: fdt_find_and_setprop() failed:%d\n",
__func__, ret);