Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp291161pxx; Wed, 28 Oct 2020 05:09:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHqRf1VQPcvZqvsLSCKJspYxexWromR6j+48iTGfnC9L7qCegPsc1UFdLbIL4rVQdNl5t0 X-Received: by 2002:a17:906:48b:: with SMTP id f11mr7395225eja.293.1603886968428; Wed, 28 Oct 2020 05:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603886968; cv=none; d=google.com; s=arc-20160816; b=veyUWWOrpCB2Kw75k3EClHlqrLFAb6V5ERVhXmCU5/+vSxlUHenSzuEp7rAmVjZ9d+ WNizOs4CtkQ50WfERBiy6RtbHUZtL/m9alO8deDrlnxVVaWRtIo6DCZ5nyRbtCw3x5dH pzDllmunafX2idXQ6HhDAAZ63FLChOvzviJutPGRcRPN92Gif1e1PNNQLl73Q7jE/F7G NW5QfeydgmQkgebeDM0CTnoq434V657afX6VUv0F9DBwmlcENAre+LMndbknVCyyLnfN c+BEhuwnEnMVkxdwSQsBsN02lGluG3OfCZfRWWDOGzuWdZYvrZpHHB9sacO1qB1/IM7v W3VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MAzX4uah56f/cnyhvw3sIeLN0M90vq9Ywd+dD+BogAU=; b=nPMfI1FdnqKiNbjJGPY21HSKfdwc731hXWDoxFEYJAPhe9fe3tf2BRsFVN8r5TKHWc DLg9nPalfEbRVOe9WwtMtLIYyH/zkB8L9rdpXUTIx23uaPR1YWPoFqKkST0HUPpijM6e TexrMS4EcFYxpASD8LJbl/sBKBJsirdOVUhGj1A33pMvuiff4MFFlT0KPVvDjdmmfAMC rFY+lSKoaqfLuLb6b9D2MCfFPaH5P+m72XGSnodIGoZkq6/m7UBTcdCxoYHo1q6hxnZM m1KKQ0+hE95Onjmp77N4BqJSANtsvivWwInC54Or8tJQixImlpZHnLQDSjGUz9QwISMO jLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VqKqsa2b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x26si2664388eds.99.2020.10.28.05.09.05; Wed, 28 Oct 2020 05:09:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VqKqsa2b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1795685AbgJ0PPT (ORCPT + 99 others); Tue, 27 Oct 2020 11:15:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:48072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1794477AbgJ0PMA (ORCPT ); Tue, 27 Oct 2020 11:12:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0198222EA; Tue, 27 Oct 2020 15:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811520; bh=J5bb873i0+TuyjZqE8UHm0yuR6yzcriMWdBhPjlHMO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VqKqsa2bHT9y720w62FOlU4nJfhphiSxPyFpKCX+7L8NpjYrkWBLiq8AUhF51m+4z yJtt1fEMFyBUR5SCV9HNP9kSUwVpEIm+3V14oE7RGSDHAkISdvjmolfwvpF/+oVtoT WLIdq2pz3ZI8dLbTWMUmWttW/R3a2wtUrbRBWP0E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Dave Jiang , Jon Mason , Sasha Levin Subject: [PATCH 5.8 523/633] ntb: intel: Fix memleak in intel_ntb_pci_probe Date: Tue, 27 Oct 2020 14:54:26 +0100 Message-Id: <20201027135547.305141043@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu [ Upstream commit dbb8df5c2d27610a87b0168a8acc89d73fbfde94 ] The default error branch of a series of pdev_is_gen calls should free ndev just like what we've done in these calls. Fixes: 26bfe3d0b227 ("ntb: intel: Add Icelake (gen4) support for Intel NTB") Signed-off-by: Dinghao Liu Acked-by: Dave Jiang Signed-off-by: Jon Mason Signed-off-by: Sasha Levin --- drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c index 423f9b8fbbcf5..fa561d455f7c8 100644 --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c @@ -1893,7 +1893,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev, goto err_init_dev; } else { rc = -EINVAL; - goto err_ndev; + goto err_init_pci; } ndev_reset_unsafe_flags(ndev); -- 2.25.1