From: Wei Yongjun <weiyj.lk@gmail.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Hanjun Guo <hanjun.guo@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-acpi@vger.kernel.org
Subject: [PATCH -next] ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()
Date: Sun, 5 Feb 2017 15:45:59 +0000 [thread overview]
Message-ID: <20170205154559.31664-1-weiyj.lk@gmail.com> (raw)
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);
next reply other threads:[~2017-02-05 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-05 15:45 Wei Yongjun [this message]
2017-02-06 10:04 ` [PATCH -next] ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170205154559.31664-1-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=hanjun.guo@linaro.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=rjw@rjwysocki.net \
--cc=sudeep.holla@arm.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).