]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tlv_eeprom: Return -ENOSYS when system call is not available
authorSimon Glass <sjg@chromium.org>
Wed, 24 Mar 2021 21:26:07 +0000 (10:26 +1300)
committerSimon Glass <sjg@chromium.org>
Tue, 6 Apr 2021 04:33:19 +0000 (16:33 +1200)
When CMD_TLV_EEPROM is not enabled, use -ENOSYS, which is the correct
error code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/tlv_eeprom.h

index 1de2fe2337cee09c624693f2924c260531ba4d98..a2c333e74465ecb23ceeed2f305600761050306f 100644 (file)
@@ -114,19 +114,19 @@ int read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
 
 static inline int read_tlv_eeprom(void *eeprom, int offset, int len, int dev)
 {
-       return -ENOTSUPP;
+       return -ENOSYS;
 }
 
 static inline int write_tlv_eeprom(void *eeprom, int len)
 {
-       return -ENOTSUPP;
+       return -ENOSYS;
 }
 
 static inline int
 read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
                        struct tlvinfo_tlv **first_entry, int dev)
 {
-       return -ENOTSUPP;
+       return -ENOSYS;
 }
 
 #endif /* CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */