On Sat, May 1, 2021 at 10:25 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > On Sat, May 1, 2021 at 8:28 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: ... > > + iio_dev_opaque->bounce_buffer = > > + devm_krealloc(&indio_dev->dev, > > + iio_dev_opaque->bounce_buffer, > > Oh la la, foo = realloc(foo, ...) is 101 type of mistakes. > Please, don't do this. > > > + indio_dev->scan_bytes, GFP_KERNEL); > > + if (!iio_dev_opaque) And this check... > > + return -ENOMEM; > > + } -- With Best Regards, Andy Shevchenko