irqchip: madera: Don't clear irq_dev until we are finished using it
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 11 Dec 2017 14:16:42 +0000 (14:16 +0000)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:28 +0000 (20:22 +0300)
irq_dev is still required for madera_free_irq as it will call
madera_map_irq, so don't clear it until after we are finished with it.

Change-Id: I747eea13d38d3b9acc8c522da44672d488a3d5a7
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
drivers/irqchip/irq-madera.c

index efa08f57b32ed89b622c8842c37aaade6e9b75f3..40a348730762fec2995e60c59e14b48cb066b85b 100644 (file)
@@ -294,10 +294,10 @@ static int madera_irq_remove(struct platform_device *pdev)
         * it starts cleaning up all child drivers
         */
 
-       priv->madera->irq_dev = NULL;
-
        madera_free_irq(priv->madera, MADERA_IRQ_BOOT_DONE, priv->madera);
 
+       priv->madera->irq_dev = NULL;
+
        regmap_del_irq_chip(priv->irq, priv->irq_data);
        free_irq(priv->irq, priv);