On Fri, Apr 9, 2021 at 10:22 AM Yicong Yang <yangyicong@xxxxxxxxxxxxx> wrote: > On 2021/4/8 21:09, Alexandru Ardelean wrote: > > On Thu, Apr 8, 2021 at 2:41 PM Yicong Yang <yangyicong@xxxxxxxxxxxxx> wrote: ... > >> - if (!ptr) > >> - return NULL; > >> + if (!iio_dev) > >> + return iio_dev; > > > > This is correct. > > But the preference is usually: > > if (!iio_dev) > > return NULL; > > > > since it returned iio_dev when failure before, so i just keep as is Actually Alexandru has a good point. Compare the pieces I left above. -- With Best Regards, Andy Shevchenko