power: qpnp-charger: check base address in qpnp_chg_write/read

When one of the peripherals is not initialized it may occur
that an incorrect register may be attempted to be written.

Fix this by adding a check for the base address when attempting
a spmi read or write.

CRs-Fixed: 495966
Change-Id: I6d9fd3fe747992e5e601cef210eb19875ce9036c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
1 file changed