diff options
author | Yanhong Wang <yanhong.wang@starfivetech.com> | 2022-12-29 11:53:12 +0300 |
---|---|---|
committer | Yanhong Wang <yanhong.wang@starfivetech.com> | 2023-01-03 05:24:26 +0300 |
commit | 4db1f73604cda4a3dc95e130615862ecfd99c1a6 (patch) | |
tree | efd51a89d1a49f2970f87db0136f2e5b07d0678f /board/starfive | |
parent | 8a4e190ee227330d340324ea4c4277c702f2ae9b (diff) | |
download | u-boot-4db1f73604cda4a3dc95e130615862ecfd99c1a6.tar.xz |
misc: OTP: Starfive-jh7110: update the return value of starfive_otp_read
Update the return value to match the function prototype definition.
Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Diffstat (limited to 'board/starfive')
-rw-r--r-- | board/starfive/evb/starfive_evb.c | 2 | ||||
-rwxr-xr-x | board/starfive/visionfive/starfive_visionfive.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/board/starfive/evb/starfive_evb.c b/board/starfive/evb/starfive_evb.c index 1dd722ef40..8a30a24de0 100644 --- a/board/starfive/evb/starfive_evb.c +++ b/board/starfive/evb/starfive_evb.c @@ -244,7 +244,7 @@ int misc_init_r(void) } ret = misc_read(dev, MACADDR_OFFSET, buf, sizeof(buf)); - if (ret) + if (ret != sizeof(buf)) printf("%s: error reading mac from OTP\n", __func__); else if (buf[0] != 0xff) { diff --git a/board/starfive/visionfive/starfive_visionfive.c b/board/starfive/visionfive/starfive_visionfive.c index 7f9de3d9de..e1b0042f10 100755 --- a/board/starfive/visionfive/starfive_visionfive.c +++ b/board/starfive/visionfive/starfive_visionfive.c @@ -192,7 +192,7 @@ int misc_init_r(void) } ret = misc_read(dev, MACADDR_OFFSET, buf, sizeof(buf)); - if (ret) + if (ret != sizeof(buf)) printf("%s: error reading mac from OTP\n", __func__); else if (buf[0] != 0xff) |