lkml.org 
[lkml]   [2013]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 137/153] [media] rc: unlock on error in show_protocols()
    3.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit 30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 upstream.

    We recently introduced a new return -ENODEV in this function but we need
    to unlock before returning.

    [mchehab@redhat.com: found two patches with the same fix. Merged SOB's/acks into one patch]
    Acked-by: Herton R. Krzesinski <herton.krzesinski@canonical.com>
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>

    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/media/rc/rc-main.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/drivers/media/rc/rc-main.c
    +++ b/drivers/media/rc/rc-main.c
    @@ -777,8 +777,10 @@ static ssize_t show_protocols(struct dev
    } 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,



    \
     
     \ /
      Last update: 2013-03-04 06:01    [W:4.046 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site