Commit 34c9b855 authored by Anirudh Ghayal's avatar Anirudh Ghayal Committed by Gerrit - the friendly Code Review server
Browse files

power: pm8921-charger: NULL check in 'external_power_changed' callback



The power-supply framework internally calls power_supply_changed
after registering a power-supply type. This ends up calling
'external_power_changed' callback which unconditionally
accesses 'the_chip' pointer (which gets initialized later).
Fix this by adding a NULL check.

CRs-Fixed: 466083
Change-Id: I75a58ca5ab37e44454f139a2644ab316afe3c4b8
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent a0d5da80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment