Re: [PATCH 1/1] i2c: Fix pm_runtime_get_if_in_use() usage in sensor drivers

2018-07-30 Thread Tomasz Figa
On Mon, Jul 30, 2018 at 9:12 PM Sakari Ailus wrote: > > pm_runtime_get_if_in_use() returns -EINVAL if runtime PM is disabled. This > should not be considered an error. Generally the driver has enabled > runtime PM already so getting this error due to runtime PM being disabled > will not happen. >

[PATCH 1/1] i2c: Fix pm_runtime_get_if_in_use() usage in sensor drivers

2018-07-30 Thread Sakari Ailus
pm_runtime_get_if_in_use() returns -EINVAL if runtime PM is disabled. This should not be considered an error. Generally the driver has enabled runtime PM already so getting this error due to runtime PM being disabled will not happen. Instead of checking for lesser or equal to zero, check for zero