Re: [PATCH] Input: bma150: fix ref count leak in bma150_open

2020-06-14 Thread Navid Emamdoost
On Sun, Jun 14, 2020 at 4:27 AM Andy Shevchenko wrote: > > On Sun, Jun 14, 2020 at 8:58 AM Navid Emamdoost > wrote: > > > > in bma150_open, pm_runtime_get_sync is called which > > increments the counter even in case of failure, leading to incorrect > > ref count. In case of failure, decrement the

Re: [PATCH] Input: bma150: fix ref count leak in bma150_open

2020-06-14 Thread Andy Shevchenko
On Sun, Jun 14, 2020 at 8:58 AM Navid Emamdoost wrote: > > in bma150_open, pm_runtime_get_sync is called which > increments the counter even in case of failure, leading to incorrect > ref count. In case of failure, decrement the ref count before returning. ... > error = pm_runtime_get_sy

Re: [PATCH] Input: bma150: fix ref count leak in bma150_open

2020-06-14 Thread Markus Elfring
> in bma150_open, … * Can the term “reference count” become relevant also for this commit message besides other possible adjustments? * Will the tag “Fixes” become helpful? … > +++ b/drivers/input/misc/bma150.c … > @@ -357,10 +357,13 @@ static int bma150_open(struct input_dev *input) >

[PATCH] Input: bma150: fix ref count leak in bma150_open

2020-06-13 Thread Navid Emamdoost
in bma150_open, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/input/misc/bma150.c | 7 +-- 1 file changed, 5 insertio