mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mailbox: apcs-ipc: Add resource error handling
Add error handling for when platform_get_resource returns NULL. Change-Id: I080ed5466ccd4f0f695c16ac047afb538706bc9b Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
97c227d3e7
commit
12decae4d3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user