linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()
@ 2017-02-05 15:45 Wei Yongjun
  2017-02-06 10:04 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 6+ messages in thread
From: Wei Yongjun @ 2017-02-05 15:45 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Rafael J. Wysocki,
	Len Brown
  Cc: Wei Yongjun, linux-acpi

From: Wei Yongjun <weiyongjun1@huawei.com>

The error return code PTR_ERR(pdev) is always 0 since pdev is
equal to 0 in this error handling case.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index e0d2e6e..655407a 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -828,7 +828,7 @@ static int __init iort_add_smmu_platform_device(struct acpi_iort_node *node)
 
 	pdev = platform_device_alloc(ops->name, PLATFORM_DEVID_AUTO);
 	if (!pdev)
-		return PTR_ERR(pdev);
+		return -ENOMEM;
 
 	count = ops->iommu_count_resources(node);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-06 12:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-05 15:45 [PATCH -next] ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device() Wei Yongjun
2017-02-06 10:04 ` Lorenzo Pieralisi
2017-02-06 11:41   ` Rafael J. Wysocki
2017-02-06 12:07     ` Lorenzo Pieralisi
2017-02-06 12:09       ` Rafael J. Wysocki
2017-02-06 12:10       ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).