Commit 30475ef2 authored by Antoniu Miclaus's avatar Antoniu Miclaus Committed by Jonathan Cameron

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: default avatarAntoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20220819104117.4600-1-antoniu.miclaus@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b82217e7
......@@ -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,
......
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