Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]>
- Loading branch information