From: Michael Trimarchi Date: Fri, 15 Feb 2013 22:42:51 +0000 (-0800) Subject: Input: bma150 - fix checking pm_runtime_get_sync() return value X-Git-Tag: v3.9-rc1~150^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79f34d19d7d1ece9918afe079529e61f978eeebe;p=pandora-kernel.git 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: Michael Trimarchi Signed-off-by: Antonio Ospite Signed-off-by: Dmitry Torokhov --- Reading git-diff-tree failed