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: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> [lorenzo.pieralisi@arm.com: improved commit log] Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: NWill Deacon <will.deacon@arm.com>
Showing
想要评论请 注册 或 登录