* Re: [PATCH] Input: bma150: fix ref count leak in bma150_open
@ 2020-06-14 9:17 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2020-06-14 9:17 UTC (permalink / raw)
To: Navid Emamdoost, linux-input
Cc: Navid Emamdoost, Kangjie Lu, Stephen McCamant, Qiushi Wu,
Dmitry Torokhov, Jonathan Bakker, Paweł Chmiel,
kernel-janitors, linux-kernel
> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-14 9:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 9:17 [PATCH] Input: bma150: fix ref count leak in bma150_open Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).