On Fri, 24 Jan 2014, Thierry Reding wrote: > On Thu, Jan 23, 2014 at 10:32:20PM +0100, Christian Engelmayer wrote: > > Fix a memory leak in the lp3943_pwm_request_map() error handling path. > > Make sure already allocated pwm map memory is freed correctly. > > Detected by Coverity: CID 1162829. > > > > Signed-off-by: Christian Engelmayer <[email protected]> > > --- > > drivers/pwm/pwm-lp3943.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c > > index 8a843a0..a40b9c3 100644 > > --- a/drivers/pwm/pwm-lp3943.c > > +++ b/drivers/pwm/pwm-lp3943.c > > @@ -52,8 +52,10 @@ lp3943_pwm_request_map(struct lp3943_pwm *lp3943_pwm, > > int hwpwm) > > offset = pwm_map->output[i]; > > > > /* Return an error if the pin is already assigned */ > > - if (test_and_set_bit(offset, &lp3943->pin_used)) > > + if (test_and_set_bit(offset, &lp3943->pin_used)) { > > + kfree(pwm_map); > > return ERR_PTR(-EBUSY); > > + } > > } > > > > return pwm_map; > > Lee, since you took this driver via the MFD tree, would you mind picking > up this fix as well?
Everything I have is now in Mainline. It's best for you to apply it now I think? > In case you don't have it in your inbox somewhere, you should be able to > grab it from here: > > http://patchwork.ozlabs.org/patch/313741/ > > In that case: > > Acked-by: Thierry Reding <[email protected]> > > Thierry -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
