]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: efuse: fix misc_read() return values
authorJohn Keeping <john@metanate.com>
Mon, 27 Mar 2023 11:01:09 +0000 (12:01 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 21 Apr 2023 07:16:01 +0000 (15:16 +0800)
commit2c428c3a2ae14bce48b0b4880a9a68d8b0c7b889
tree630ea19c4bcc449f61e1b54608e18ee4fdc1df59
parent1cb4bb8ca73c0c412f66736d17537b51f6d101e0
rockchip: efuse: fix misc_read() return values

The documentation for misc_read() says:

    Return: number of bytes read if OK (may be 0 if EOF), -ve on error

The Rockchip efuse driver implements this so it should return the number
of bytes read rather than zero on success.  Fix this so that the driver
follows the usual contract for read operations.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/misc/rockchip-efuse.c