spmi: spmi_pmic_arb: Fix null pointer check

Fix null pointer check to prevent invalid memory access.

CRs-Fixed: 643935
Change-Id: Ia753a2b0f814d639c39a17e14826fd0558f8af30
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
This commit is contained in:
Dan Sneddon 2014-04-04 14:56:04 -06:00
parent 761debc78b
commit 722e20a0b1

View File

@ -1017,7 +1017,7 @@ static int pmic_arb_devm_ioremap(struct platform_device *pdev,
"%s ioremap(phy:0x%lx vir:0x%p len:0x%lx)\n", res_name,
(ulong) mem_res->start, *virt, (ulong) resource_size(mem_res));
if (!virt) {
if (!(*virt)) {
dev_err(&pdev->dev,
"error %s ioremap(phy:0x%lx len:0x%lx) failed\n",
res_name, (ulong) mem_res->start,