Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 722e20a0 authored by Dan Sneddon's avatar Dan Sneddon
Browse files

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: default avatarDan Sneddon <dsneddon@codeaurora.org>
parent 761debc7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,