mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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: 16531118ba
("iio: bmi323: peripheral in lowest power state on suspend")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/689a2122-6e2f-4b0c-9a1c-39a98621c6c1@stanley.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
506a1ac4c4
commit
50161b2768
@ -2231,8 +2231,10 @@ static int bmi323_core_runtime_resume(struct device *dev)
|
||||
* after being reset in the lower power state by runtime-pm.
|
||||
*/
|
||||
ret = bmi323_init(data);
|
||||
if (!ret)
|
||||
if (ret) {
|
||||
dev_err(data->dev, "Device power-on and init failed: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Register must be cleared before changing an active config */
|
||||
ret = regmap_write(data->regmap, BMI323_FEAT_IO0_REG, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user