summaryrefslogtreecommitdiff
path: root/drivers/iio/industrialio-core.c
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-05-26 18:47:17 +0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 13:08:47 +0100
commit0187294d227dfc42889e1da8f8ce1e44fc25f147 (patch)
treecb1a65891e8b2cd007d05bceb07b4d2e1743c4a9 /drivers/iio/industrialio-core.c
parentd7369ae1f4d7cffa7574d15e1f787dcca184c49d (diff)
iio: magnetometer: ak8974: Fix runtime PM imbalance on error
When devm_regmap_init_i2c() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. For error paths after ak8974_set_power(), ak8974_detect() and ak8974_reset(), things are the same. However, When iio_triggered_buffer_setup() returns an error code, there will be two PM usgae counter decrements. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974") Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
0 files changed, 0 insertions, 0 deletions