[tip: irq/drivers] irqchip/pruss-intc: Use match data directly
From: tip-bot2 for Andrew Davis
Date: Mon Sep 07 2026 - 15:54:02 EST
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 02a2db115989749b945fc1dc3e935a4a07eebb8e
Gitweb: https://git.kernel.org/tip/02a2db115989749b945fc1dc3e935a4a07eebb8e
Author: Andrew Davis <afd@xxxxxx>
AuthorDate: Thu, 03 Sep 2026 13:52:19 -05:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Mon, 07 Sep 2026 21:47:51 +02:00
irqchip/pruss-intc: Use match data directly
The match data is fetched before the instance data is available, but it is
not used until after. Skip the temporary variable and fetch the match data
after it has a place to be stored.
Signed-off-by: Andrew Davis <afd@xxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: Radu Rendec <radu@xxxxxxxxxx>
Link: https://patch.msgid.link/20260903185220.2014861-1-afd@xxxxxx
---
drivers/irqchip/irq-pruss-intc.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 81078d5..cc3a7c2 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -516,24 +516,21 @@ static const char * const irq_names[MAX_NUM_HOST_IRQS] = {
static int pruss_intc_probe(struct platform_device *pdev)
{
- const struct pruss_intc_match_data *data;
struct device *dev = &pdev->dev;
struct pruss_intc *intc;
struct pruss_host_irq_data *host_data;
int i, irq, ret;
u8 max_system_events, irqs_reserved = 0;
- data = of_device_get_match_data(dev);
- if (!data)
- return -ENODEV;
-
- max_system_events = data->num_system_events;
-
intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
if (!intc)
return -ENOMEM;
- intc->soc_config = data;
+ intc->soc_config = of_device_get_match_data(dev);
+ if (!intc->soc_config)
+ return -ENODEV;
+ max_system_events = intc->soc_config->num_system_events;
+
intc->dev = dev;
platform_set_drvdata(pdev, intc);