Skip to content
Commit 04fc06f6 authored by Martin Kepplinger's avatar Martin Kepplinger Committed by Hans Verkuil
Browse files

media: hi846: fix usage of pm_runtime_get_if_in_use()



pm_runtime_get_if_in_use() does not only return nonzero values when
the device is in use, it can return a negative errno too.

And especially during resuming from system suspend, when runtime pm
is not yet up again, -EAGAIN is being returned, so the subsequent
pm_runtime_put() call results in a refcount underflow.

Fix system-resume by handling -EAGAIN of pm_runtime_get_if_in_use().

Signed-off-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
Fixes: e8c08826 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera")
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent e103484c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment