summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-11-21 17:39:29 +0300
committerThomas Gleixner <tglx@linutronix.de>2022-12-06 14:50:17 +0300
commit55721afa8d8b82e442cb4eaf7173330f79cbfb48 (patch)
tree067c48005571bebd4ecb4d4070e88fdf917b48e3 /drivers/irqchip
parentfa5745aca1dc819aee6463a2475b5c277f7cf8f6 (diff)
downloadlinux-55721afa8d8b82e442cb4eaf7173330f79cbfb48.tar.xz
irqchip/irq-mvebu-icu: Fix works by chance pointer assignment
Assigning a void pointer which points to a struct to two different data types only works by chance if the second type is the first member of the struct. Replace this works by chance code by using the primary struct pointer. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221121140048.344525618@linutronix.de
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-mvebu-icu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c
index 497da344717c..3c77acc7ec6a 100644
--- a/drivers/irqchip/irq-mvebu-icu.c
+++ b/drivers/irqchip/irq-mvebu-icu.c
@@ -151,9 +151,9 @@ static int
mvebu_icu_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
unsigned long *hwirq, unsigned int *type)
{
- struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d);
- struct mvebu_icu *icu = platform_msi_get_host_data(d);
unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2;
+ struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d);
+ struct mvebu_icu *icu = msi_data->icu;
/* Check the count of the parameters in dt */
if (WARN_ON(fwspec->param_count != param_count)) {