summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-16 15:28:56 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-16 15:28:56 -0500
commit1249f820f29bf4dd3701a3bb0f4b78e8d96ca2c4 (patch)
treefe95516d6af7c5f5504f5d2f889b4cd0d13be3c9
parente7040f65cbb2b275ee25eff79fef9a1bcdf23dbe (diff)
downloadmts-io-1249f820f29bf4dd3701a3bb0f4b78e8d96ca2c4.tar.gz
mts-io-1249f820f29bf4dd3701a3bb0f4b78e8d96ca2c4.tar.bz2
mts-io-1249f820f29bf4dd3701a3bb0f4b78e8d96ca2c4.zip
Undefined variable issue
-rw-r--r--io-module/mts_io.c5
1 files changed, 1 insertions, 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] == '-') &&