[PATCH v3 1/3] rockchip: misc: fix misc_read() return check

Simon Glass sjg at chromium.org
Mon Mar 27 21:02:11 CEST 2023


On Tue, 28 Mar 2023 at 00:01, John Keeping <john at metanate.com> wrote:
>
> misc_read() is documented to return the number of bytes read or a
> negative error value.  The Rockchip drivers currently do not implement
> this correctly and instead return zero on success or a negative error
> value.
>
> In preparation for fixing the drivers, fix the condition here to only
> error on negative values.
>
> Suggested-by: Jonas Karlman <jonas at kwiboo.se>
> Signed-off-by: John Keeping <john at metanate.com>
> ---
> v3: new patch
>
>  arch/arm/mach-rockchip/misc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list