public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Bagnall <douglas@paradise.net.nz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Mauro Carvalho Chehab" <mchehab@redhat.com>,
	"David Härdeman" <david@hardeman.nu>,
	"Jarod Wilson" <jarod@redhat.com>,
	"Ezequiel Garcia" <elezegarcia@gmail.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 1/2] [media] rc: unlock on error in show_protocols()
Date: Wed, 28 Nov 2012 08:51:48 +1300	[thread overview]
Message-ID: <50B519D4.7050904@paradise.net.nz> (raw)
In-Reply-To: <20121127173509.GE1059@elgon.mountain>

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@oracle.com>
> 
> 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,
> 


      reply	other threads:[~2012-11-27 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 17:35 [patch 1/2] [media] rc: unlock on error in show_protocols() Dan Carpenter
2012-11-27 19:51 ` Douglas Bagnall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B519D4.7050904@paradise.net.nz \
    --to=douglas@paradise.net.nz \
    --cc=dan.carpenter@oracle.com \
    --cc=david@hardeman.nu \
    --cc=elezegarcia@gmail.com \
    --cc=jarod@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox