Il giorno gio 3 ott 2019 alle ore 16:02 Amit Kucheria <amit.kucheria@xxxxxxxxxx> ha scritto: > > On Wed, Oct 2, 2019 at 8:57 AM Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> wrote: > > > > On 02/10/2019 01:00, Amit Kucheria wrote: > > > On Tue, Oct 1, 2019 at 2:27 PM <kholk11@xxxxxxxxx> wrote: > > >> > > >> From: AngeloGioacchino Del Regno <kholk11@xxxxxxxxx> > > >> > > >> Add support for reading calibrated value from thermistors in > > >> MSM8956, MSM8976 and their APQ variants. > > >> > > >> Signed-off-by: AngeloGioacchino Del Regno <kholk11@xxxxxxxxx> > > >> --- > > > > [ ... ] > > > > >> -/* v1.x: qcs404,405 */ > > >> +static int calibrate_8976(struct tsens_priv *priv) > > >> +{ > > >> + int base0 = 0, base1 = 0, i; > > >> + u32 p1[11], p2[11]; > > >> + int mode = 0, tmp = 0; > > >> + u32 *qfprom_cdata; > > >> + > > >> + qfprom_cdata = (u32 *)qfprom_read(priv->dev, "calib"); > > >> + if (IS_ERR(qfprom_cdata)) > > > > > > kfree(qfprom_data) here > > > > (Assuming s/qfprom_data/qfprom_cdata/) > > > > Where the allocation happen? > > > > nvmem_cell_read() call inside qfprom_read() > > /Amit Thanks for the review. I will apply the suggested changes and resend ASAP.