public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ACPI/IORT: fix an error code
@ 2017-01-17 13:36 Dan Carpenter
  2017-01-17 13:54 ` Lorenzo Pieralisi
  2017-01-18  2:09 ` Hanjun Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-01-17 13:36 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Hanjun Guo, Sudeep Holla, Rafael J. Wysocki, Len Brown,
	linux-acpi, kernel-janitors

We accidentally return success if platform_device_alloc() fails.

Fixes: 846f0e9e74a0 ("ACPI/IORT: Add support for ARM SMMU platform devices creation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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] 3+ messages in thread

end of thread, other threads:[~2017-01-18  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 13:36 [patch] ACPI/IORT: fix an error code Dan Carpenter
2017-01-17 13:54 ` Lorenzo Pieralisi
2017-01-18  2:09 ` Hanjun Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox