diff mbox

reservation: Remove shadowing local variable 'ret'

Message ID 1421910017-14627-1-git-send-email-michel@daenzer.net (mailing list archive)
State New, archived
Headers show

Commit Message

Michel Dänzer Jan. 22, 2015, 7 a.m. UTC
From: Michel Dänzer <michel.daenzer@amd.com>

It was causing the return value of fence_is_signaled to be ignored, making
reservation objects signal too early.

Cc: stable@vger.kernel.org
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/dma-buf/reservation.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sumit Semwal Jan. 22, 2015, 11:04 a.m. UTC | #1
Hi Michel,

On 22 January 2015 at 12:30, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> It was causing the return value of fence_is_signaled to be ignored, making
> reservation objects signal too early.
>
Thanks; pushed to my for-next.

> Cc: stable@vger.kernel.org
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
> ---
>  drivers/dma-buf/reservation.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
> index 3c97c8f..8a37af9 100644
> --- a/drivers/dma-buf/reservation.c
> +++ b/drivers/dma-buf/reservation.c
> @@ -402,8 +402,6 @@ reservation_object_test_signaled_single(struct fence *passed_fence)
>         int ret = 1;
>
>         if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) {
> -               int ret;
> -
>                 fence = fence_get_rcu(lfence);
>                 if (!fence)
>                         return -1;
> --
> 2.1.4
>
diff mbox

Patch

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index 3c97c8f..8a37af9 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -402,8 +402,6 @@  reservation_object_test_signaled_single(struct fence *passed_fence)
 	int ret = 1;
 
 	if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) {
-		int ret;
-
 		fence = fence_get_rcu(lfence);
 		if (!fence)
 			return -1;