lkml.org 
[lkml]   [2021]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/5] iio: adc: ad_sigma_delta: Add sequencer support
On Fri, Nov 12, 2021 at 7:10 PM Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 10 Nov 2021 13:17:48 +0200
> <alexandru.tachici@analog.com> 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()?

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


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-11-13 18:01    [W:1.284 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site