Received: by 10.213.65.68 with SMTP id h4csp241080imn; Fri, 23 Mar 2018 03:42:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELsxiEpCh7wTywMH0BfRHQaufj2QvV5uerwRqKuvQ2Jy6rMo2cso04Q/pgxZiU/uD6mXbEEs X-Received: by 10.98.35.90 with SMTP id j87mr11190283pfj.59.1521801742525; Fri, 23 Mar 2018 03:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801742; cv=none; d=google.com; s=arc-20160816; b=LG1gat/kzo1tWFiqYwo8A/JrM05RknmEsRK892oFnDozlAmpgA9nPnvlbU6/JetFQ0 fZgcWQ81bBfErJwdCRb9s3e5DrIBXsPd6DNXsIrorUnuD0G/NmX14hTE8gvYEofwUZWq FKTE/dCpLSChiLv7CMyS5j1b/WVzj2k82jiqnoaPyg/BHo5J5FPz5caAz38lNQFqlJTe hb/yKDdwq29Wlk/9vfnSjY4iK6Tdfa++XWuirGbvXERjinLMakzer7E83lSGiKBzzeUR B2YXJkMnzaxtkN3FA7C4KW3PVYK4HhgbjakN45vFokpT54d5T04SGBJQh3gTL+WJ+36H 510w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=iTmMcQX3UvQKcWNUlRr8CddgbFWzcUhKIGZN1c2EvJc=; b=lY57uC/igkVAzIJyxsWRsXA9Y6s6tf4QfchLGGUf7EUGHf1l5D5qZbNMolxle8Ppoo OCIjWbUIf0S81WMS7NxCE7wiIne3cefI4eZV7BZ4RQwWM3JpYd3tldjjDCNYu0wPP1If dNrL4au8vCF2domPDwJmDRpdEcOjBPQG6gzPKBmuKWuVR3NQ8FpctGnkRjX0NLjLicMh UU79t/uuQWhpIyMZsAO2XQeL/QqidzVC2RWPXVGqLykSuWs90WmqnwOjSZkS1Q7ed/aO 5qi4zUXh6XE2lGh0BB7mWdC47taTQRrNCsZG1d0+CRbZXnyEWBPVvOuF+cPzQ7I3zLmH 9D1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si1729619pfg.414.2018.03.23.03.42.08; Fri, 23 Mar 2018 03:42:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933644AbeCWKQ2 (ORCPT + 99 others); Fri, 23 Mar 2018 06:16:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46682 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933618AbeCWKQX (ORCPT ); Fri, 23 Mar 2018 06:16:23 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 30FE5C7B; Fri, 23 Mar 2018 10:16:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.4 78/97] media: bt8xx: Fix err bt878_probe() Date: Fri, 23 Mar 2018 10:55:05 +0100 Message-Id: <20180323094201.936884743@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ 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 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- 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;