msm: ais: fix crash during dumping io register

Check whether ispif->base is null before dumping.

Change-Id: I7d9738d5361052b01a5e4a205d9f18a9e36b64bd
CRs-Fixed: 2046207
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
This commit is contained in:
Rahul Sharma 2017-07-11 14:32:27 +05:30 committed by Gerrit - the friendly Code Review server
parent 3629cb733f
commit b1d4d653cc

View file

@ -69,6 +69,11 @@ static void msm_ispif_io_dump_reg(struct ispif_device *ispif)
{
if (!ispif->enb_dump_reg)
return;
if (!ispif->base) {
pr_err("%s: null pointer for the ispif base\n", __func__);
return;
}
msm_camera_io_dump(ispif->base, 0x250, 0);
}