Re: [patch 1/2] [media] rc: unlock on error in show_protocols()

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

 



On 28/11/12 06:35, Dan Carpenter wrote:
> We recently introduced a new return -ENODEV in this function but we need
> to unlock before returning.

There is an identical patch here (scroll down):
https://patchwork.kernel.org/patch/1284081/

I'm not sure what happened to it.

Douglas

> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 601d1ac1..d593bc6 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -789,8 +789,10 @@ static ssize_t show_protocols(struct device *device,
>  	} else if (dev->raw) {
>  		enabled = dev->raw->enabled_protocols;
>  		allowed = ir_raw_get_allowed_protocols();
> -	} else
> +	} else {
> +		mutex_unlock(&dev->lock);
>  		return -ENODEV;
> +	}
>  
>  	IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
>  		   (long long)allowed,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux