Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: core: fix a few code style issues

* Fix indent in else statement
* Remove unnecessary 'else' after 'break'
* Remove space in '* attr'

Signed-off-by: Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
Link: https://lore.kernel.org/r/20220312180343.8935-1-alexander.vorwerk@stud.uni-goettingen.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Alexander Vorwerk and committed by
Jonathan Cameron
f4decb4c 31231092

+3 -4
+2 -2
drivers/iio/industrialio-buffer.c
··· 915 915 if (scan_mask == NULL) 916 916 return -EINVAL; 917 917 } else { 918 - scan_mask = compound_mask; 918 + scan_mask = compound_mask; 919 919 } 920 920 921 921 config->scan_bytes = iio_compute_scan_bytes(indio_dev, ··· 1649 1649 } 1650 1650 1651 1651 attrn = buffer_attrcount + scan_el_attrcount + ARRAY_SIZE(iio_buffer_attrs); 1652 - attr = kcalloc(attrn + 1, sizeof(* attr), GFP_KERNEL); 1652 + attr = kcalloc(attrn + 1, sizeof(*attr), GFP_KERNEL); 1653 1653 if (!attr) { 1654 1654 ret = -ENOMEM; 1655 1655 goto error_free_scan_mask;
+1 -2
drivers/iio/industrialio-core.c
··· 892 892 } else if (*str == '\n') { 893 893 if (*(str + 1) == '\0') 894 894 break; 895 - else 896 - return -EINVAL; 895 + return -EINVAL; 897 896 } else if (!strncmp(str, " dB", sizeof(" dB") - 1) && scale_db) { 898 897 /* Ignore the dB suffix */ 899 898 str += sizeof(" dB") - 1;