arm: mach-k3: am642_init: Correct the length of the host string to 5 instead of 4

While calculating the length of the property value to be replaced with,
also include the "\0" character. This makes the length of the new property
value "host" to be 5 and not 4.

Fixes: d0d92256cb ("arm: mach-k3: am642_init: Fix the length of new property value in fdt_find_and_setprop()")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
This commit is contained in:
Aswath Govindraju 2021-06-01 17:13:25 +05:30 committed by Praneeth Bajjuri
parent 2e99ef2e23
commit c0abb51a28
1 changed files with 1 additions and 1 deletions

View File

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