Open_and_lseek() return actual error code via errno, so change the code to use it instead of return value. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/mips/mach-ath79/art.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/mach-ath79/art.c b/arch/mips/mach-ath79/art.c index 984d08736..2a2099e9f 100644 --- a/arch/mips/mach-ath79/art.c +++ b/arch/mips/mach-ath79/art.c @@ -44,8 +44,8 @@ static int art_read_mac(struct device_d *dev, const char *file) fd = open_and_lseek(file, O_RDONLY, AR93000_EPPROM_OFFSET); if (fd < 0) { dev_err(dev, "Failed to open eeprom path %s %d\n", - file, fd); - return fd; + file, -errno); + return -errno; } rbytes = read_full(fd, &eeprom, sizeof(eeprom)); -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox