iio: magnetometer: ak8974: remove conditional return with no effect

Both branches of the check return the same value, so the check has no
effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
This commit is contained in:
Sang-Heon Jeon
2026-07-28 03:47:46 +09:00
committed by Jonathan Cameron
parent 0addd3b688
commit 017e71cbe0

View File

@@ -379,11 +379,7 @@ static int ak8974_getresult(struct ak8974 *ak8974, __le16 *result)
return -ERANGE;
}
ret = regmap_bulk_read(ak8974->map, AK8974_DATA_X, result, 6);
if (ret)
return ret;
return ret;
return regmap_bulk_read(ak8974->map, AK8974_DATA_X, result, 6);
}
static irqreturn_t ak8974_drdy_irq(int irq, void *d)