lkml.org 
[lkml]   [2018]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 15/77] media: bt8xx: Fix err bt878_probe()
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>


    [ Upstream commit 45392ff6881dbe56d41ef0b17c2e576065f8ffa1 ]

    This is odd to call 'pci_disable_device()' in an error path before a
    coresponding successful 'pci_enable_device()'.

    Return directly instead.

    Fixes: 77e0be12100a ("V4L/DVB (4176): Bug-fix: Fix memory overflow")

    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/media/pci/bt8xx/bt878.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    --- a/drivers/media/pci/bt8xx/bt878.c
    +++ b/drivers/media/pci/bt8xx/bt878.c
    @@ -422,8 +422,7 @@ static int bt878_probe(struct pci_dev *d
    bt878_num);
    if (bt878_num >= BT878_MAX) {
    printk(KERN_ERR "bt878: Too many devices inserted\n");
    - result = -ENOMEM;
    - goto fail0;
    + return -ENOMEM;
    }
    if (pci_enable_device(dev))
    return -EIO;

    \
     
     \ /
      Last update: 2018-03-23 12:56    [W:4.023 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site