On Mon, Jul 30, 2018 at 9:12 PM Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> 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. > > Instead of checking for lesser or equal to zero, check for zero only. > Address this for drivers where this pattern exists. > > This patch has been produced using the following command: > > $ git grep -l pm_runtime_get_if_in_use -- drivers/media/i2c/ | \ > xargs perl -i -pe 's/(pm_runtime_get_if_in_use\(.*\)) \<\= 0/!$1/' > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > drivers/media/i2c/ov13858.c | 2 +- > drivers/media/i2c/ov2685.c | 2 +- > drivers/media/i2c/ov5670.c | 2 +- > drivers/media/i2c/ov5695.c | 2 +- > drivers/media/i2c/ov7740.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) Thanks! Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx> Best regards, Tomasz