From: void0red <void0red@gmail.com>
To: will@kernel.org
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Kang Chen <void0red@gmail.com>
Subject: [PATCH] perf/smmuv3: add a check of devm_add_action in smmu_pmu_setup_msi
Date: Mon, 27 Feb 2023 11:25:57 +0800 [thread overview]
Message-ID: <20230227032557.894274-1-void0red@gmail.com> (raw)
From: Kang Chen <void0red@gmail.com>
devm_add_action may fails, add a warning when it happens.
Signed-off-by: Kang Chen <void0red@gmail.com>
---
drivers/perf/arm_smmuv3_pmu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 25a269d43..307bac904 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -724,7 +724,11 @@ static void smmu_pmu_setup_msi(struct smmu_pmu *pmu)
pmu->irq = msi_get_virq(dev, 0);
/* Add callback to free MSIs on teardown */
- devm_add_action(dev, smmu_pmu_free_msis, dev);
+ ret = devm_add_action(dev, smmu_pmu_free_msis, dev);
+ if (ret) {
+ dev_warn(dev, "failed to add callback to free MSIs on teardown\n");
+ return;
+ }
}
static int smmu_pmu_setup_irq(struct smmu_pmu *pmu)
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-02-27 3:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 3:25 void0red [this message]
2023-03-27 11:26 ` [PATCH] perf/smmuv3: add a check of devm_add_action in smmu_pmu_setup_msi 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=20230227032557.894274-1-void0red@gmail.com \
--to=void0red@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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).