2009-07-30 09:57:40

by Stoyan Gaydarov

[permalink] [raw]
Subject: [PATCH] missing mutex unlock

This was found using a semantic patch, more info can be found at:
http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Stoyan Gaydarov <[email protected]>
---
drivers/w1/masters/omap_hdq.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index a7e3b70..0d92969 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -687,6 +687,7 @@ static int omap_hdq_remove(struct platform_device *pdev)

if (hdq_data->hdq_usecount) {
dev_dbg(&pdev->dev, "removed when use count is not zero\n");
+ mutex_unlock(&hdq_data->hdq_mutex);
return -EBUSY;
}

--
1.6.3.3


2009-07-30 11:10:20

by Evgeniy Polyakov

[permalink] [raw]
Subject: Re: [PATCH] missing mutex unlock

On Thu, Jul 30, 2009 at 04:57:18AM -0500, Stoyan Gaydarov ([email protected]) wrote:
> This was found using a semantic patch, more info can be found at:
> http://www.emn.fr/x-info/coccinelle/
>
> Signed-off-by: Stoyan Gaydarov <[email protected]>

Yup, that's correct.
Ack, thank you.

Andrew, please apply.

> ---
> drivers/w1/masters/omap_hdq.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
> index a7e3b70..0d92969 100644
> --- a/drivers/w1/masters/omap_hdq.c
> +++ b/drivers/w1/masters/omap_hdq.c
> @@ -687,6 +687,7 @@ static int omap_hdq_remove(struct platform_device *pdev)
>
> if (hdq_data->hdq_usecount) {
> dev_dbg(&pdev->dev, "removed when use count is not zero\n");
> + mutex_unlock(&hdq_data->hdq_mutex);
> return -EBUSY;
> }
>
> --
> 1.6.3.3