[Skiboot] [PATCH 8/9] dts: Zero struct to avoid using uninitialised value
Cyril Bur
cyril.bur at au1.ibm.com
Mon Mar 19 15:54:19 AEDT 2018
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
hw/dts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/dts.c b/hw/dts.c
index ecfe8471..2c366699 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -267,7 +267,7 @@ static int dts_wakeup_core(struct cpu_thread *cpu)
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;
@@ -395,7 +395,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)
--
2.16.2
More information about the Skiboot
mailing list