]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 12 Apr 2021 05:32:02 +0000 (13:32 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 18 Apr 2021 09:44:57 +0000 (10:44 +0100)
commit8874711271da8a195846fa30b4651908b2f93fcf
treeb0b7608ea89d6d385a17033a394521f153029ce3
parentfbecba8b838b68ec94f52e838a80be1e67015843
iio: proximity: pulsedlight: Fix rumtime PM imbalance on error

When lidar_write_control() fails, a pairing PM usage counter
decrement is needed to keep the counter balanced.

Fixes: 4ac4e086fd8c5 ("iio: pulsedlight-lidar-lite: add runtime PM")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210412053204.4889-1-dinghao.liu@zju.edu.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c