aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2018-03-19 15:54:19 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-27 14:51:38 +1100
commit351b05be3d403cd444db4390a5d9110631240cb6 (patch)
tree7b6ee7cdd19faeff74673eb5ace0ea4cf8fb4306 /hw
parent35f003a01174b253239bfd33fcc12dcf88378ce9 (diff)
downloadskiboot-351b05be3d403cd444db4390a5d9110631240cb6.zip
skiboot-351b05be3d403cd444db4390a5d9110631240cb6.tar.gz
skiboot-351b05be3d403cd444db4390a5d9110631240cb6.tar.bz2
dts: Zero struct to avoid using uninitialised value
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/dts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/dts.c b/hw/dts.c
index 949791b..dffdfcb 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -239,7 +239,7 @@ static int dts_read_core_temp_p9(uint32_t pir, struct dts *dts)
static void dts_async_read_temp(struct timer *t __unused, void *data,
u64 now __unused)
{
- struct dts dts;
+ struct dts dts = {0};
int rc, swkup_rc;
struct cpu_thread *cpu = data;
@@ -367,7 +367,7 @@ int64_t dts_sensor_read(u32 sensor_hndl, int token, u64 *sensor_data)
{
uint8_t attr = sensor_get_attr(sensor_hndl);
uint32_t rid = sensor_get_rid(sensor_hndl);
- struct dts dts;
+ struct dts dts = {0};
int64_t rc;
if (attr > SENSOR_DTS_ATTR_TEMP_TRIP)