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

Commit 12decae4 authored by Chris Lew's avatar Chris Lew
Browse files

mailbox: apcs-ipc: Add resource error handling



Add error handling for when platform_get_resource returns NULL.

Change-Id: I080ed5466ccd4f0f695c16ac047afb538706bc9b
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 97c227d3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res)
		return -ENODEV;
	base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
	if (IS_ERR(base))
		return PTR_ERR(base);