Re: [PATCH 3/5] iio: adc: ad_sigma_delta: Add sequencer support

From: Jonathan Cameron
Date: Sat Nov 13 2021 - 13:18:51 EST


On Sat, 13 Nov 2021 19:00:11 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Fri, Nov 12, 2021 at 7:10 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> > On Wed, 10 Nov 2021 13:17:48 +0200
> > <alexandru.tachici@xxxxxxxxxx> wrote:
>
>
> > > + kfree(sigma_delta->samples_buf);
> >
> > krealloc() preferred. It might not be necessary to actually do an allocation after all
> > if we happen to have one we can already use.
>
> Looking at below, shouldn't it be krealloc_array()?

True

>
> > > + sigma_delta->samples_buf = kzalloc(slot * indio_dev->channels[0].scan_type.storagebits,
> > > + GFP_KERNEL);
>
>