> On 29 Apr 2022, at 21:57, Stefano Stabellini <sstabell...@kernel.org> wrote:
>
> From: Stefano Stabellini <stefano.stabell...@xilinx.com>
>
> When the length of the string is zero of_property_read_string should
> return -ENODATA according to the description of the function.
>
> However, of_property_read_string doesn't check prop->length. If
> prop->length is zero, return -ENODATA.
>
> Without this patch the following command in u-boot:
>
> fdt set /chosen/node property-name
>
> results in of_property_read_string returning -EILSEQ when attempting to
> read property-name. With this patch, it returns -ENODATA as expected.
>
> This commit is a backport of:
> https://lore.kernel.org/xen-devel/20220416003028.1315268-1-sstabell...@kernel.org/
>
> Signed-off-by: Stefano Stabellini <stefano.stabell...@xilinx.com>
Reviewed-by: Luca Fancellu <luca.fance...@arm.com>
> ---
> Changes in v5:
> - backport from Linux, I don't have the commit id yet so I used an LKML
> link instead for now