On Fri, Dec 09, 2011 at 07:46:06PM +0530, Ashish Jangam wrote:

> +     req = kzalloc(sizeof(*req), GFP_KERNEL);
> +     if (!req)
> +             return -ENOMEM;

> +     init_completion(&req->done);
> +     req->input = channel;
> +
> +     if (channel > DA9052_ADC_VBBAT)
> +             return -EINVAL;

This will leak the request.

> +     list_del(&req->list);
> +err:
> +     mutex_unlock(&da9052->auxadc_lock);
> +     return ret;
> +}
> +EXPORT_SYMBOL_GPL(da9052_adc_manual_read);

In fact is req freed at all?

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to