[PATCH 1/9] pinctrl: pinctrl-nomadik: Fix possible memory leak

Linus Walleij linus.walleij at linaro.org
Fri Jul 6 03:03:37 EDT 2012


On Thu, Jul 5, 2012 at 3:06 PM, Lee Jones <lee.jones at linaro.org> wrote:

> If the Nomadik Pin Control driver is continuously bound and unbound
> from the same device a number of times the kzalloc() will leak
> memory. Replacing it with devm_kzalloc() will ensure memory is
> freed automatically in the event of failure and unbinding.
>
> Signed-off-by: Lee Jones <lee.jones at linaro.org>

A patch like this but more all-encompassing was already sent out
by me some days ago:
http://marc.info/?l=linux-kernel&m=134139303405730&w=2

Please test that one and see if it solves your problem.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list