Re: [PATCH] of: restricted dma: Fix condition for rmem init

From: Rob Herring
Date: Fri Sep 17 2021 - 16:58:19 EST


On Fri, 17 Sep 2021 14:14:23 +0100, David Brazdil wrote:
> of_dma_set_restricted_buffer fails to handle negative return values from
> of_property_count_elems_of_size, e.g. when the property does not exist.
> This results in an attempt to assign a non-existent reserved memory
> region to the device and a warning being printed. Fix the condition to
> take negative values into account.
>
> Fixes: f3cfd136aef0 ("of: restricted dma: Don't fail device probe on
> rmem init failure")
> Cc: Will Deacon <will@xxxxxxxxxx>
> Signed-off-by: David Brazdil <dbrazdil@xxxxxxxxxx>
> ---
> drivers/of/device.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>

Applied, thanks!