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

Commit 009544d5 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

power: smb5: fix uninitalized variable warning



 drivers/power/supply/qcom/smb5-lib.c: In function 'smblib_set_prop_pr_swap_in_progress':
 drivers/power/supply/qcom/smb5-lib.c:4978:15: error:
  'stat' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Fixes: caceca44 ("power: smb5: Add snapshot of SMB5 driver and its dependencies")
Change-Id: Ic0dedbadb6100f7e050cac16c8de1ccda778842a
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 3b3e314b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 */

#include <linux/device.h>
@@ -4952,7 +4952,7 @@ int smblib_set_prop_pr_swap_in_progress(struct smb_charger *chg,
				const union power_supply_propval *val)
{
	int rc;
	u8 stat, orientation;
	u8 stat = 0, orientation;

	chg->pr_swap_in_progress = val->intval;