From: Tejun Heo Date: Sat, 7 Apr 2007 05:59:41 +0000 (+0900) Subject: [PATCH] irq-devres: fix failure path of devm_request_irq() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7f30e49ee1c2c1e95ce9d2ccce5221ddb793dd60;p=openwrt%2Fstaging%2Fblogic.git [PATCH] 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 Cc: Andrew Morton Cc: Greg KH Signed-off-by: Linus Torvalds --- diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c index 85a430da0fb6..d8ee241115f5 100644 --- a/kernel/irq/devres.c +++ b/kernel/irq/devres.c @@ -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; }