Re: [PATCH v2] iio: imu: adis16400: release allocated memory on failure

2019-09-21 Thread Jonathan Cameron
On Fri, 20 Sep 2019 06:46:37 + "Ardelean, Alexandru" wrote: > On Thu, 2019-09-19 at 10:50 -0500, Navid Emamdoost wrote: > > In adis_update_scan_mode, if allocation for adis->buffer fails, > > previously allocated adis->xfer needs to be released. > > > > v2: added adis->xfer = NULL to avoid a

Re: [PATCH v2] iio: imu: adis16400: release allocated memory on failure

2019-09-19 Thread Ardelean, Alexandru
On Thu, 2019-09-19 at 10:50 -0500, Navid Emamdoost wrote: > In adis_update_scan_mode, if allocation for adis->buffer fails, > previously allocated adis->xfer needs to be released. > > v2: added adis->xfer = NULL to avoid any potential double free. Reviewed-by: Alexandru Ardelean > Signed-off-by

[PATCH v2] iio: imu: adis16400: release allocated memory on failure

2019-09-19 Thread Navid Emamdoost
In adis_update_scan_mode, if allocation for adis->buffer fails, previously allocated adis->xfer needs to be released. v2: added adis->xfer = NULL to avoid any potential double free. Signed-off-by: Navid Emamdoost --- drivers/iio/imu/adis_buffer.c | 5 - 1 file changed, 4 insertions(+), 1 de