leds: qti-tri-led: Fix uninitialized variable error

Fix the uninitialized variable error reported by static analyzer.

CRs-fixed: 2206448
Change-Id: Ic77998c2b175b3d8276ad9d9e94815ba69fa5733
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
This commit is contained in:
Kiran Gunda 2018-03-15 18:03:06 +05:30 committed by Gerrit - the friendly Code Review server
parent 967c44cd6d
commit b9a830f3ae

View File

@ -358,7 +358,7 @@ static int qpnp_tri_led_parse_dt(struct qpnp_tri_led_chip *chip)
struct qpnp_led_dev *led;
struct pwm_args pargs;
const __be32 *addr;
int rc, id, i = 0;
int rc = 0, id, i = 0;
addr = of_get_address(chip->dev->of_node, 0, NULL, NULL);
if (!addr) {