Skip to content
Commit 999680c4 authored by John Keeping's avatar John Keeping Committed by Kever Yang
Browse files

rockchip: misc: fix misc_read() return check



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: default avatarJonas Karlman <jonas@kwiboo.se>
Signed-off-by: default avatarJohn Keeping <john@metanate.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarKever Yang <kever.yang@rock-chips.com>
parent 6fa83833
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment