mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-23 12:10:29 +00:00
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:
parent
761debc78b
commit
722e20a0b1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user