From 059a4c6fff71e1f213fc6d34a82c984660534973 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 28 Aug 2018 09:35:35 +0000 Subject: [PATCH] avoid uninitialised variable use ok patrick@ kettenis@ --- sys/dev/ofw/ofw_regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ofw/ofw_regulator.c b/sys/dev/ofw/ofw_regulator.c index cd916e88139..9fc61335a15 100644 --- a/sys/dev/ofw/ofw_regulator.c +++ b/sys/dev/ofw/ofw_regulator.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_regulator.c,v 1.6 2018/08/13 15:14:27 patrick Exp $ */ +/* $OpenBSD: ofw_regulator.c,v 1.7 2018/08/28 09:35:35 jsg Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -218,6 +218,7 @@ regulator_gpio_get_voltage(int node) OF_getpropintarray(node, "gpios", gpios, glen); OF_getpropintarray(node, "states", states, slen); + i = 0; idx = 0; gpio = gpios; while (gpio && gpio < gpios + (glen / sizeof(uint32_t))) { -- 2.20.1