device_iot_config: Fix KW warnings

Fix KW TAINT warnings

Change-Id: I06083c2e00f1f20e54ebdc4c36d5ec0304f09e7a
CRs-Fixed: 2492496
diff --git a/system_bt_ext/device/src/device_iot_config.cc b/system_bt_ext/device/src/device_iot_config.cc
index b5b3d18..b68d852 100644
--- a/system_bt_ext/device/src/device_iot_config.cc
+++ b/system_bt_ext/device/src/device_iot_config.cc
@@ -361,7 +361,11 @@
   int result = 0;
   std::unique_lock<std::mutex> lock(config_lock);
   result = config_get_int(config, section, key, result);
-  result += 1;
+  if (result >= 0) {
+    result += 1;
+  } else {
+    result = 0;
+  }
   config_set_int(config, section, key, result);
   device_iot_config_save();