Home
last modified time | relevance | path

Searched hist:"0 d4b2184cfee8293203fc22029b081dbbec9b879" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/iio/
H A Dindustrialio-core.cdiff 0d4b2184cfee8293203fc22029b081dbbec9b879 Sun Apr 19 17:13:37 CEST 2020 Jonathan Cameron <Jonathan.Cameron@huawei.com> iio: Use an early return in iio_device_alloc to simplify code.

Noticed whilst reviewing Alexandru's patch to the same function.
If we simply flip the logic and return NULL immediately after memory
allocation failure we reduce the indent of the following block and
end up with more 'idiomatic' kernel code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>