Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c84b1079 authored by Kiran Gunda's avatar Kiran Gunda
Browse files

pwm: pwm-qpnp: Fix the uninitialized local variable



"pwm_change_mode" returns the garbage value as the local variable
"rc" is returned without being initialized and updated. Fix it by
initializing the "rc" to "0".

Change-Id: Ifde4873fd91e13202c41fdf817bd85acc7ea36e0
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 3364abb7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1475,7 +1475,7 @@ static void qpnp_pwm_disable(struct pwm_chip *pwm_chip,
 */
int pwm_change_mode(struct pwm_device *pwm, enum pm_pwm_mode mode)
{
	int rc;
	int rc = 0;
	unsigned long flags;
	struct qpnp_pwm_chip *chip;