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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux