iio: core: Calculate alloc_size only once in iio_device_alloc()
No need to rewrite the value, instead use 'else' branch. This will also help further refactoring the code later on. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240304140650.977784-3-andriy.shevchenko@linux.intel.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment