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:
Anirudh Ghayal <aghayal@codeaurora.org>
Loading
Please sign in to comment