Skip to content
Commit 79f34d19 authored by Michael Trimarchi's avatar Michael Trimarchi Committed by Dmitry Torokhov
Browse files

Input: bma150 - fix checking pm_runtime_get_sync() return value



When PM_RUNTIME is not defined, pm_runtime_get_sync() returns 1, see
include/linux/pm_runtime.c::__pm_runtime_resume(), and the check of the
return value was overlooking this, in this case bma150_open() would
return 1 which is not expected by upper layers.

Maybe the check for != -ENOSYS (Function not implemented) was meant to
cover this, but pm_runtime_get_sync() does not return this value.

For now fix the issue locally by checking explicitly for negative return
values.

Signed-off-by: default avatarMichael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: default avatarAntonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent cd401204
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment