diff options
| author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-16 17:21:00 +0100 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-06-16 14:53:13 +0100 |
| commit | 0e4f336f50debeacd0f81e931e8451f2ae03f685 (patch) | |
| tree | e217e0778abc55b5ba78d78bee640f47b6884c8c /scripts/gdb/linux/timerlist.py | |
| parent | 17181d4dc33094cb0c51369e4b5172086a14812b (diff) | |
iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get()
The pm_runtime_put_noidle() call in remove isn't balanced with any get, so
drop it. Note this isn't a bug as the runtime pm core will not allow the
reference count to go negative, making this a noop. However, it is
confusing to the reader so let's drop it.
pm_runtime_resume_and_get() replacement found using the coccicheck script
under review at:
https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/
As pm_runtime_resume_and_get() returns <= 0 take advantage of that to
change the error checking to if (ret) which is more in keeping with the
rest of this driver.
This is a prequel to taking a closer look at the runtime pm in IIO drivers
in general.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210516162103.1332291-4-jic23@kernel.org
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions
