drivers: Fix more compiler warnings
Fix uninitialized variable warnings that were not previously caught by
old compiler.
Change-Id: I5014a235da41d32a3a1ae234286270ec9af875fc
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
diff --git a/drivers/leds/leds-qpnp-flash-v2.c b/drivers/leds/leds-qpnp-flash-v2.c
index 08809a9..01e553c 100644
--- a/drivers/leds/leds-qpnp-flash-v2.c
+++ b/drivers/leds/leds-qpnp-flash-v2.c
@@ -677,7 +677,8 @@
#define VIN_FLASH_MIN_UV 3300000LL
static int qpnp_flash_led_calc_max_current(struct qpnp_flash_led *led)
{
- int ocv_uv, rbatt_uohm, ibat_now, voltage_hdrm_mv, rc;
+ int ocv_uv, ibat_now, voltage_hdrm_mv, rc;
+ int rbatt_uohm = 0;
int64_t ibat_flash_ua, avail_flash_ua, avail_flash_power_fw;
int64_t ibat_safe_ua, vin_flash_uv, vph_flash_uv, vph_flash_vdip;
diff --git a/drivers/soc/qcom/gladiator_hang_detect.c b/drivers/soc/qcom/gladiator_hang_detect.c
index 07ea43c..b0940ad 100644
--- a/drivers/soc/qcom/gladiator_hang_detect.c
+++ b/drivers/soc/qcom/gladiator_hang_detect.c
@@ -71,7 +71,7 @@
hang_dev->M1_threshold = threshold_val;
else if (offset == hang_dev->M2_offset)
hang_dev->M2_threshold = threshold_val;
- else if (offset == hang_dev->PCIO_offset)
+ else
hang_dev->PCIO_threshold = threshold_val;
}
@@ -86,7 +86,7 @@
*reg_value = hang_dev->M1_threshold;
else if (offset == hang_dev->M2_offset)
*reg_value = hang_dev->M2_threshold;
- else if (offset == hang_dev->PCIO_offset)
+ else
*reg_value = hang_dev->PCIO_threshold;
}
@@ -101,7 +101,7 @@
hang_dev->M1_enable = enabled;
else if (offset == hang_dev->M2_offset)
hang_dev->M2_enable = enabled;
- else if (offset == hang_dev->PCIO_offset)
+ else
hang_dev->PCIO_enable = enabled;
}
@@ -116,7 +116,7 @@
*reg_value = hang_dev->M1_enable;
else if (offset == hang_dev->M2_offset)
*reg_value = hang_dev->M2_enable;
- else if (offset == hang_dev->PCIO_offset)
+ else
*reg_value = hang_dev->PCIO_enable;
}