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

iio: frequency: admv1014: return -EINVAL directly

Remove extra step where the error code is assigned to the `ret`
variable.

Return instead error code directly.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20220819104117.4600-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
30475ef2 b82217e7

+1 -2
+1 -2
drivers/iio/frequency/admv1014.c
··· 669 669 chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id); 670 670 if (chip_id != ADMV1014_CHIP_ID) { 671 671 dev_err(&spi->dev, "Invalid Chip ID.\n"); 672 - ret = -EINVAL; 673 - return ret; 672 + return -EINVAL; 674 673 } 675 674 676 675 ret = __admv1014_spi_update_bits(st, ADMV1014_REG_QUAD,