irq-devres: fix failure path of devm_request_irq()
PATCH 1/1 irq-devres: fix failure path of devm_request_irq()
devres should be deallocated with devres_free() not kfree(). This bug corrupts slab on IRQ request failure. Fix it.
Signed-off-by Tejun Heo <[email protected]>
---
Sorry about the bug, please apply before 2.6.21 release. Thanks.
kernel/irq/devres.c +1 -1
@@ -54,7 +54,7 @@ int devm_request_irq(struct device *dev, unsigned int irq, rc =request_irq (irq, handler, irqflags, devname, dev_id);if (rc) { -kfree (dr); +devres_free (dr);return rc; }