From c0abb51a288b47b0d6b9a727ff7c9982f47dd9e6 Mon Sep 17 00:00:00 2001 From: Aswath Govindraju Date: Tue, 1 Jun 2021 17:13:25 +0530 Subject: [PATCH] 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: d0d92256cbd8 ("arm: mach-k3: am642_init: Fix the length of new property value in fdt_find_and_setprop()") Signed-off-by: Aswath Govindraju --- arch/arm/mach-k3/am642_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 51f6e81def..3871fe0002 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -97,7 +97,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", 4, 0); + "dr_mode", "host", 5, 0); if (ret) printf("%s: fdt_find_and_setprop() failed:%d\n", __func__, ret);