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

From: Markus Elfring
Date: Sun Jun 14 2020 - 05:18:06 EST


> 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)
> if (bma150->mode != BMA150_MODE_NORMAL) {
> error = bma150_set_mode(bma150, BMA150_MODE_NORMAL);
> if (error)
> - return error;
> + goto out;
> }
>
> return 0;
> +out:
> + pm_runtime_put(&bma150->client->dev);
> + return error;
> }
â

Perhaps use the label âput_runtimeâ instead?

Regards,
Markus