summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-03-06 23:49:12 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-11 07:55:45 +0100
commit6bc098928799009119a6de3d8190329945283bae (patch)
treeb47e1a37b948089bb7b20cd5a0737bd3421ec98d /arch
parent7c293700db4d1b14ba55bc221af9afc0ed233f01 (diff)
downloadbarebox-6bc098928799009119a6de3d8190329945283bae.tar.gz
barebox-6bc098928799009119a6de3d8190329945283bae.tar.xz
MIPS: ath79: Use errno to get error code from open_and_lseek()
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@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mach-ath79/art.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/mach-ath79/art.c b/arch/mips/mach-ath79/art.c
index 984d087363..2a2099e9f5 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));