mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2025-01-07 12:03:13 +00:00
[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 <htejun@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
995f054f2a
commit
7f30e49ee1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user