mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
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:
committed by
Jonathan Cameron
parent
0addd3b688
commit
017e71cbe0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user