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

Commit 915edd9d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "smb1351-charger: Fix possible Null pointer dereference"

parents 078e8404 bc2dcbfa
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015 The Linux Foundation. All rights reserved.
/* Copyright (c) 2016 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
@@ -1872,6 +1872,12 @@ static void smb1351_chg_adc_notification(enum qpnp_tm_state state, void *ctx)
		}
	}

	if (!cur) {
		pr_debug("Couldn't choose batt state, adc state=%d and temp=%d\n",
			state, temp);
		return;
	}

	if (cur->batt_present)
		chip->battery_missing = false;
	else