From: jeffy.chen@rock-chips.com (Jeffy Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 02/14] iommu/rockchip: Fix error handling in probe
Date: Thu, 1 Mar 2018 18:08:12 +0800 [thread overview]
Message-ID: <20180301100824.14887-3-jeffy.chen@rock-chips.com> (raw)
In-Reply-To: <20180301100824.14887-1-jeffy.chen@rock-chips.com>
Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 16cd8780c289..c2ef3cbd4401 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1193,8 +1193,12 @@ static int rk_iommu_probe(struct platform_device *pdev)
iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops);
err = iommu_device_register(&iommu->iommu);
+ if (err) {
+ iommu_device_sysfs_remove(&iommu->iommu);
+ return err;
+ }
- return err;
+ return 0;
}
static const struct of_device_id rk_iommu_dt_ids[] = {
--
2.11.0
next prev parent reply other threads:[~2018-03-01 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 10:08 [PATCH v6 00/14] iommu/rockchip: Use OF_IOMMU Jeffy Chen
2018-03-01 10:08 ` [PATCH v6 01/14] iommu/rockchip: Prohibit unbind and remove Jeffy Chen
2018-03-01 10:08 ` Jeffy Chen [this message]
2018-03-01 10:08 ` [PATCH v6 03/14] iommu/rockchip: Request irqs in rk_iommu_probe() Jeffy Chen
2018-03-01 10:08 ` [PATCH v6 04/14] iommu/rockchip: Fix error handling in attach Jeffy Chen
2018-03-01 10:08 ` [PATCH v6 05/14] iommu/rockchip: Use iopoll helpers to wait for hardware Jeffy Chen
2018-03-01 10:08 ` [PATCH v6 06/14] iommu/rockchip: Fix TLB flush of secondary IOMMUs Jeffy Chen
2018-03-01 10:08 ` [PATCH v6 07/14] ARM: dts: rockchip: add clocks in iommu nodes Jeffy Chen
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=20180301100824.14887-3-jeffy.chen@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).