linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] video: mmp: delete a stray mutex_unlock()
@ 2013-11-14  8:19 Dan Carpenter
  2013-12-13 13:11 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-11-14  8:19 UTC (permalink / raw)
  To: linux-fbdev

We aren't holding the disp_lock so we shouldn't release it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/video/mmp/core.c b/drivers/video/mmp/core.c
index 84de263..c8d4265 100644
--- a/drivers/video/mmp/core.c
+++ b/drivers/video/mmp/core.c
@@ -173,7 +173,7 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
 		+ sizeof(struct mmp_overlay) * info->overlay_num;
 	path = kzalloc(size, GFP_KERNEL);
 	if (!path)
-		goto failed;
+		return NULL;
 
 	/* path set */
 	mutex_init(&path->access_ok);
@@ -219,11 +219,6 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
 
 	mutex_unlock(&disp_lock);
 	return path;
-
-failed:
-	kfree(path);
-	mutex_unlock(&disp_lock);
-	return NULL;
 }
 EXPORT_SYMBOL_GPL(mmp_register_path);
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch 1/2] video: mmp: delete a stray mutex_unlock()
  2013-11-14  8:19 [patch 1/2] video: mmp: delete a stray mutex_unlock() Dan Carpenter
@ 2013-12-13 13:11 ` Dan Carpenter
  2013-12-14  7:27 ` Haojian Zhuang
  2014-01-10 11:29 ` Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-12-13 13:11 UTC (permalink / raw)
  To: linux-fbdev

Ping.

regards,
dan carpenter

On Thu, Nov 14, 2013 at 11:19:18AM +0300, Dan Carpenter wrote:
> We aren't holding the disp_lock so we shouldn't release it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/video/mmp/core.c b/drivers/video/mmp/core.c
> index 84de263..c8d4265 100644
> --- a/drivers/video/mmp/core.c
> +++ b/drivers/video/mmp/core.c
> @@ -173,7 +173,7 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>  		+ sizeof(struct mmp_overlay) * info->overlay_num;
>  	path = kzalloc(size, GFP_KERNEL);
>  	if (!path)
> -		goto failed;
> +		return NULL;
>  
>  	/* path set */
>  	mutex_init(&path->access_ok);
> @@ -219,11 +219,6 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>  
>  	mutex_unlock(&disp_lock);
>  	return path;
> -
> -failed:
> -	kfree(path);
> -	mutex_unlock(&disp_lock);
> -	return NULL;
>  }
>  EXPORT_SYMBOL_GPL(mmp_register_path);
>  
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/2] video: mmp: delete a stray mutex_unlock()
  2013-11-14  8:19 [patch 1/2] video: mmp: delete a stray mutex_unlock() Dan Carpenter
  2013-12-13 13:11 ` Dan Carpenter
@ 2013-12-14  7:27 ` Haojian Zhuang
  2014-01-10 11:29 ` Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Haojian Zhuang @ 2013-12-14  7:27 UTC (permalink / raw)
  To: linux-fbdev

On 12/13/2013 09:11 PM, Dan Carpenter wrote:
> Ping.
>
> regards,
> dan carpenter
>
> On Thu, Nov 14, 2013 at 11:19:18AM +0300, Dan Carpenter wrote:
>> We aren't holding the disp_lock so we shouldn't release it.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/drivers/video/mmp/core.c b/drivers/video/mmp/core.c
>> index 84de263..c8d4265 100644
>> --- a/drivers/video/mmp/core.c
>> +++ b/drivers/video/mmp/core.c
>> @@ -173,7 +173,7 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>>   		+ sizeof(struct mmp_overlay) * info->overlay_num;
>>   	path = kzalloc(size, GFP_KERNEL);
>>   	if (!path)
>> -		goto failed;
>> +		return NULL;
>>
>>   	/* path set */
>>   	mutex_init(&path->access_ok);
>> @@ -219,11 +219,6 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>>
>>   	mutex_unlock(&disp_lock);
>>   	return path;
>> -
>> -failed:
>> -	kfree(path);
>> -	mutex_unlock(&disp_lock);
>> -	return NULL;
>>   }
>>   EXPORT_SYMBOL_GPL(mmp_register_path);
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

Jean,
Could you help to merge this fix?

Regards
Haojian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/2] video: mmp: delete a stray mutex_unlock()
  2013-11-14  8:19 [patch 1/2] video: mmp: delete a stray mutex_unlock() Dan Carpenter
  2013-12-13 13:11 ` Dan Carpenter
  2013-12-14  7:27 ` Haojian Zhuang
@ 2014-01-10 11:29 ` Tomi Valkeinen
  2 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2014-01-10 11:29 UTC (permalink / raw)
  To: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

On 2013-11-14 10:19, Dan Carpenter wrote:
> We aren't holding the disp_lock so we shouldn't release it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/video/mmp/core.c b/drivers/video/mmp/core.c
> index 84de263..c8d4265 100644
> --- a/drivers/video/mmp/core.c
> +++ b/drivers/video/mmp/core.c
> @@ -173,7 +173,7 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>  		+ sizeof(struct mmp_overlay) * info->overlay_num;
>  	path = kzalloc(size, GFP_KERNEL);
>  	if (!path)
> -		goto failed;
> +		return NULL;
>  
>  	/* path set */
>  	mutex_init(&path->access_ok);
> @@ -219,11 +219,6 @@ struct mmp_path *mmp_register_path(struct mmp_path_info *info)
>  
>  	mutex_unlock(&disp_lock);
>  	return path;
> -
> -failed:
> -	kfree(path);
> -	mutex_unlock(&disp_lock);
> -	return NULL;
>  }
>  EXPORT_SYMBOL_GPL(mmp_register_path);
>  
> 

Queued for 3.14.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-10 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14  8:19 [patch 1/2] video: mmp: delete a stray mutex_unlock() Dan Carpenter
2013-12-13 13:11 ` Dan Carpenter
2013-12-14  7:27 ` Haojian Zhuang
2014-01-10 11:29 ` Tomi Valkeinen

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).