Skip to content

Commit 50161b2

Browse files
Dan Carpenterjic23
authored andcommitted
iio: bmi323: fix reversed if statement in bmi323_core_runtime_resume()
This reversed if statement means that the function just returns success without writing to the registers. Fixes: 1653111 ("iio: bmi323: peripheral in lowest power state on suspend") Signed-off-by: Dan Carpenter <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 506a1ac commit 50161b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/iio/imu/bmi323/bmi323_core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2231,8 +2231,10 @@ static int bmi323_core_runtime_resume(struct device *dev)
22312231
* after being reset in the lower power state by runtime-pm.
22322232
*/
22332233
ret = bmi323_init(data);
2234-
if (!ret)
2234+
if (ret) {
2235+
dev_err(data->dev, "Device power-on and init failed: %d", ret);
22352236
return ret;
2237+
}
22362238

22372239
/* Register must be cleared before changing an active config */
22382240
ret = regmap_write(data->regmap, BMI323_FEAT_IO0_REG, 0);

0 commit comments

Comments
 (0)