IN the scope of do_tlv_eeprom, the error-checking provided by the
read_eeprom function is not required.
Instead use the API function read_tlv_eeprom.

Signed-off-by: Josua Mayer <jo...@solid-run.com>
---
 cmd/tlv_eeprom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index bfd4882e0d..00c5b5f840 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -431,7 +431,7 @@ int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int 
argc, char *const argv[])
        // If no arguments, read the EERPOM and display its contents
        if (argc == 1) {
                if (has_been_read != current_dev) {
-                       if (read_eeprom(current_dev, eeprom) == 0)
+                       if (read_tlv_eeprom(eeprom, 0, TLV_INFO_MAX_LEN, 
current_dev) == 0)
                                has_been_read = current_dev;
                }
                show_eeprom(current_dev, eeprom);
@@ -445,7 +445,7 @@ int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int 
argc, char *const argv[])
        // Read the EEPROM contents
        if (cmd == 'r') {
                has_been_read = -1;
-               if (read_eeprom(current_dev, eeprom) == 0) {
+               if (read_tlv_eeprom(eeprom, 0, TLV_INFO_MAX_LEN, current_dev) 
== 0) {
                        printf("EEPROM data loaded from device to memory.\n");
                        has_been_read = current_dev;
                }
-- 
2.34.1

Reply via email to