From 1249f820f29bf4dd3701a3bb0f4b78e8d96ca2c4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Apr 2018 15:28:56 -0500 Subject: Undefined variable issue --- io-module/mts_io.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/io-module/mts_io.c b/io-module/mts_io.c index 14029a3..c9a0c71 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -817,7 +817,7 @@ struct attribute *freelater = NULL; // Storage to free when driver is unloaded. static int mts_id_eeprom_load(void) { - int i; + int i, j = 0; char buf[64] = {0}; char* ptr; int attr_blength; // Byte length of base attribute array @@ -836,7 +836,6 @@ mts_id_eeprom_load(void) return -EIO; } else if (((tmp=HW_VERSION_MTCAP_0_0),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0) || ((tmp=HW_VERSION_MTCAP_0_1),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0)) { - int j=0; /* See if we have no radio, and if so, prune out the stuff that follows */ if((strncmp(id_eeprom.product_id, PRODUCT_ID_MTCAP, sizeof PRODUCT_ID_MTCAP - 1) == 0) && (id_eeprom.product_id[sizeof PRODUCT_ID_MTCAP-1] == '-') && @@ -883,7 +882,6 @@ mts_id_eeprom_load(void) log_info("detected board %s", HW_VERSION_MTRV1_0_1); } else if (((tmp=HW_VERSION_MTCDT_0_1),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0) || ((tmp=HW_VERSION_MTCDTIP_0_0),strncmp(id_eeprom.hw_version, tmp, strlen(tmp)) == 0)) { - int j=0; attr_blength = sizeof mtcdt_0_1_platform_attributes; if(DEVICE_CAPA(id_eeprom.capa, CAPA_WIFI)) { attr_blength += sizeof mtcdt_0_1_wifi_bt_attributes; @@ -957,7 +955,6 @@ mts_id_eeprom_load(void) mtcdt_0_1_platform_attribute_group.attrs = all_attrs; } - int j=0; /* See if we have no radio, and if so, prune out the stuff that follows */ if((strncmp(id_eeprom.product_id, PRODUCT_ID_MTCDTIPHP, sizeof PRODUCT_ID_MTCDTIPHP - 1) == 0) && (id_eeprom.product_id[sizeof PRODUCT_ID_MTCDTIPHP-1] == '-') && -- cgit v1.2.3