summaryrefslogtreecommitdiff
path: root/drivers/iio/frequency
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2022-08-19 13:41:17 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-08-19 18:07:22 +0100
commit30475ef2836ee47965e424b79e54e35c18ff0aeb (patch)
treed8e8b7179847edeb2af42e2afe91348f74a01823 /drivers/iio/frequency
parentb82217e73b5aa6db8453ad91b929ca2366e47184 (diff)
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>
Diffstat (limited to 'drivers/iio/frequency')
-rw-r--r--drivers/iio/frequency/admv1014.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/frequency/admv1014.c b/drivers/iio/frequency/admv1014.c
index 865addd10db4..bb5e1feef42b 100644
--- a/drivers/iio/frequency/admv1014.c
+++ b/drivers/iio/frequency/admv1014.c
@@ -669,8 +669,7 @@ static int admv1014_init(struct admv1014_state *st)
chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id);
if (chip_id != ADMV1014_CHIP_ID) {
dev_err(&spi->dev, "Invalid Chip ID.\n");
- ret = -EINVAL;
- return ret;
+ return -EINVAL;
}
ret = __admv1014_spi_update_bits(st, ADMV1014_REG_QUAD,