• Mauro Carvalho Chehab's avatar
    V4L/DVB: Fix unlock logic at medusa_video_init · 64561a38
    Mauro Carvalho Chehab authored
    As reported by Dan Carpenter:
    > This was my patch:  "cx25821: fix double unlock in medusa_video_init()"
    >
    > It accidentally got merged two times.  The version from the staging tree
    > is not correct.  Please can you revert it:
    > 7a02f549 "Staging: cx25821: fix double
    > unlock in medusa_video_init()"
    
    After reviewing the logic at the function, instead of just adding a patch to
    revert the wrong one, the better is to apply a different logic: add a goto
    that will always unlock and return the error.
    
    This simplifies the code a little bit, and, instead of just return -EINVAL,
    it will return the error condition reported by the called functions.
    
    This patch is folded with another patch from Dan that added one missing
    goto.
    Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    64561a38
cx25821-medusa-video.c 21.7 KB