From 7f30e49ee1c2c1e95ce9d2ccce5221ddb793dd60 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sat, 7 Apr 2007 14:59:41 +0900 Subject: [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 --- kernel/irq/devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/irq/devres.c') 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; } -- cgit v1.2.3