
9 Apr
2020
9 Apr
'20
3:29 p.m.
Hi Stefan,
sorry I overlooked the other two things you commented on the code.
On Thu, 9 Apr 2020 10:09:52 +0200 Stefan Roese sr@denx.de wrote:
- return -1;
return -ENOENT; ?
The function returns u32. The error is reported by returning (u32)-1. The check base < 0 won't work. I would specifically have to check for -ENOENT, or use something like ERR_PTR from Linux.
if (base < 0) return base; ?