]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/ls-scfg-msi: Fix NULL dereference in error handling
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 16 Jul 2025 19:43:45 +0000 (14:43 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 18 Jul 2025 12:54:45 +0000 (14:54 +0200)
commitaabf4ff06b9789f3cd167bf9e2eb25f1fdb5541a
tree7207678afd4e468e036afe87d14c9076e09c4221
parent94b59d5f567a148a3eb25265a4e60f8605ff8423
irqchip/ls-scfg-msi: Fix NULL dereference in error handling

The call to irq_domain_remove(msi_data->parent); was accidentally left
behind during a code refactor.  It's not necessary to free
"msi_data->parent" because it is NULL and, in fact, trying to free it
will lead to a NULL pointer dereference.  Delete the unnecessary code.

Fixes: 94b59d5f567a ("irqchip/ls-scfg-msi: Switch to use msi_create_parent_irq_domain()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/all/15059507-6422-4333-94ca-e8e8840bd289@sabinyo.mountain
drivers/irqchip/irq-ls-scfg-msi.c