Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2346391imm; Thu, 7 Jun 2018 09:07:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIK8TvqozvKV7WkgKFtwfAEEPcyiDH11uw+1CNUej375cTjUrOfAWHah0TuOhFvk6xwHEgu X-Received: by 2002:a17:902:784d:: with SMTP id e13-v6mr2706349pln.197.1528387661828; Thu, 07 Jun 2018 09:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528387661; cv=none; d=google.com; s=arc-20160816; b=ZauF3gS+Owo4+HvXCFCzlMeshtPq3E6HkqVQgSOiyEnKNf4UjGarfDG6iUFlrrh682 gkXRjbAK6RvmnHS2Pwi8FEmOCq/Gbocd3E4EBAGnyMNMWKFgLRUt+mL2TzdPgRhgPUBL +T5p4EqGR0WSZVZ1p6rXygQx47Km1nh49wketNEw/QrHSAYmOyFVcWP7yt+dU0k296h7 dEDDx+9qJhT2iLCxwNmREhsyN1OnlQ87PaeQODvSx9d65bf8wik5ffloPS7XSTeR29wl SUwGA/iVNPdIgjmNrIPp9apCKSeQo+jXz0lwnwXlfHCqN4/76F2M+HmUMCTKhOso5qjy Lw9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=L5s1IRaFlS8Kbh+04ctI6HRf/aGi+frg9bHd8y/uLic=; b=dzyRr5QiiUe1iEzdb6sBkTMRk6cGMb1pWkV5Ehf9Txn3+wEzCGaLYH8rt9m5Y30jVu h901JrQRjPg9j+hmBGDQiCe8v/45zdgyaaOuVZ4OUwZZ0QTWLvoh7hkBgvXs1+q9mMIw vZg1mzmx+5wflwO2kz4YDre3kVhQ2+7xT01RGNaVMN8d/+X/Yr2Wb0YFnAJzw6jGsNZH DSlceRvXwmyzge4biUuh+wri/0ZApAhgQ4WBLwyPPUAZjWSTOmfDfTjZQl7pkVdzCVjE 4N/x2yDMDmilvr0v7dJ43tde+zpH1pX7MrDK4dRYSh+Yy18Cwz0pqRlAZIqAvmoE33ec SAXA== 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 g86-v6si25841757pfj.283.2018.06.07.09.07.27; Thu, 07 Jun 2018 09:07:41 -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 S935926AbeFGQFL (ORCPT + 99 others); Thu, 7 Jun 2018 12:05:11 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39246 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933012AbeFGOJE (ORCPT ); Thu, 7 Jun 2018 10:09:04 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvb4-0005Zi-7L; Thu, 07 Jun 2018 15:09:02 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb0-0002o4-QJ; Thu, 07 Jun 2018 15:08:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Christophe JAILLET" , "Mauro Carvalho Chehab" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 085/410] media: bt8xx: Fix err 'bt878_probe()' In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET commit 45392ff6881dbe56d41ef0b17c2e576065f8ffa1 upstream. 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: Ben Hutchings --- 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 @@ -433,8 +433,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;