Commit f4decb4c authored by Alexander Vorwerk's avatar Alexander Vorwerk Committed by Jonathan Cameron

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: default avatarAlexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
Link: https://lore.kernel.org/r/20220312180343.8935-1-alexander.vorwerk@stud.uni-goettingen.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 31231092
......@@ -1649,7 +1649,7 @@ static int __iio_buffer_alloc_sysfs_and_mask(struct iio_buffer *buffer,
}
attrn = buffer_attrcount + scan_el_attrcount + ARRAY_SIZE(iio_buffer_attrs);
attr = kcalloc(attrn + 1, sizeof(* attr), GFP_KERNEL);
attr = kcalloc(attrn + 1, sizeof(*attr), GFP_KERNEL);
if (!attr) {
ret = -ENOMEM;
goto error_free_scan_mask;
......
......@@ -892,7 +892,6 @@ static int __iio_str_to_fixpoint(const char *str, int fract_mult,
} else if (*str == '\n') {
if (*(str + 1) == '\0')
break;
else
return -EINVAL;
} else if (!strncmp(str, " dB", sizeof(" dB") - 1) && scale_db) {
/* Ignore the dB suffix */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment