Skip to content
Commit 5e5afa6c authored by Dan Carpenter's avatar Dan Carpenter Committed by Will Deacon
Browse files

ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()



The function iort_add_smmu_platform_device() accidentally returns 0
(ie PTR_ERR(pdev) where pdev == NULL) if platform_device_alloc() fails;
fix the bug by returning a proper error value.

Fixes: 846f0e9e ("ACPI/IORT: Add support for ARM SMMU platform devices creation")
Acked-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
[lorenzo.pieralisi@arm.com: improved commit log]
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>

Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 030abd8a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment