genirq: check __free_irq()'s return value for NULL
PATCH 1/1 genirq: check __free_irq()'s return value for NULL
__free_irq() can return a NULL irqaction for example when trying to free already-free IRQ. Fix this by adding a check and return NULL.
Signed-off-by Alexandru Moise <[email protected]>
--- kernel/irq/manage.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/irq/manage.c +4 -0
@@ -1643,6 +1643,10 @@ const void *free_irq(unsigned int irq, void *dev_id)#endif action =__free_irq (irq, dev_id); + +if (!action) +return NULL ; + devname = action->name;kfree (action);return devname;
Signature · 1 line
2.14.1