Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp692703ybg; Mon, 1 Jun 2020 11:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYExPihBgKSZruXORhQ/XUnrOIb+wFu8+GI5umFRal8+eGuSo0+yhiSF2ZeNlHgbl7jnta X-Received: by 2002:a05:6402:3ca:: with SMTP id t10mr17978635edw.128.1591037426542; Mon, 01 Jun 2020 11:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591037426; cv=none; d=google.com; s=arc-20160816; b=bdaXnuQby4VnUUT5QcFr/oNG6klmlh8F12HOKU+AQvLSndMB8nJLS+BO1ziG/WfpLF DvdrUmXKEoh1YD6ctrdbqwAYKrEW09DK3FGEJwZb6p5+9WBTwFbbgussII1OhzXo8lQ9 k07FAKalAFQ7uSNJlcuqhg/o0+O2mZ8o9gXpHyO6IBye1ad39NYtRAoEFPok0G6zUUj/ 28rmFKY8IErh+yLKEFOZ4dpERB9uZTxNUBW8UjRb3s9B5KKsy5BS30lVdW+MMb4LQep6 BVJAmrV+/yoTbvLnoyKvZFD0m+qoSs7f5H28X2je0DZR3W/9TYDQTQxicMp2vdwKe2qa jX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7mLOWcwfUZSRod3sQpH7u5Xm2qV2zbYLY41u7gadjIA=; b=pTnKN++ZNlDHsu43HYItj6NtnwatEpWTNQWu7f/5cja27IzlKUHTV6oiY4cF4sa7Jg DmOaR3ikqvuyJVTr9e9gce6pgmFGGbHcWIWEGwmKZqkGR3pE3tcTjJ+Bix459OaK6YcF 1p5d4tLRBR1F85OqnwCR4/ebdvglGH5rRftfHm5w9OM5kv2PLK1P11BR8VLnky6fVWWY 3sJXc48CNoXla38FV1LIkM7isgy2BOFedJLOaaM4hEP1GYSUxtOUmfsOz6B9+MVgGA4g YaZ2y9EkWso+jJXrUyVOGY3zilyAHzOhKiTiYmwBvETkneIRzQmAkwMmcyRa3OJ/q8+F mh1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B4dSwDDg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si154206edt.132.2020.06.01.11.50.03; Mon, 01 Jun 2020 11:50:26 -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=B4dSwDDg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730617AbgFASHk (ORCPT + 99 others); Mon, 1 Jun 2020 14:07:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:52832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730533AbgFASHC (ORCPT ); Mon, 1 Jun 2020 14:07:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 01BF2206E2; Mon, 1 Jun 2020 18:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034822; bh=d6n1lfALiOuqf6hD6qY0ykkceo3UeXoajd4//MCBJ98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4dSwDDgwL3l2nt78msaX17Zo3T7ntT120EgkYm7kZaGSc5E/xCiv6+ZMaofFK2EE vy0EopfXNqHaHrKOcgOY/WWDSnjtOKwYQpT1772ETaJXAP6y/styr3iDUIKx6oCQrE TA8e3q0zGr889vwR+ntfPgP0iWIdajrx2TCx7G5g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qiushi Wu , "David S. Miller" Subject: [PATCH 5.4 029/142] net: sun: fix missing release regions in cas_init_one(). Date: Mon, 1 Jun 2020 19:53:07 +0200 Message-Id: <20200601174040.917626256@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiushi Wu commit 5a730153984dd13f82ffae93d7170d76eba204e9 upstream. In cas_init_one(), "pdev" is requested by "pci_request_regions", but it was not released after a call of the function “pci_write_config_byte” failed. Thus replace the jump target “err_write_cacheline” by "err_out_free_res". Fixes: 1f26dac32057 ("[NET]: Add Sun Cassini driver.") Signed-off-by: Qiushi Wu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/sun/cassini.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c @@ -4971,7 +4971,7 @@ static int cas_init_one(struct pci_dev * cas_cacheline_size)) { dev_err(&pdev->dev, "Could not set PCI cache " "line size\n"); - goto err_write_cacheline; + goto err_out_free_res; } } #endif @@ -5144,7 +5144,6 @@ err_out_iounmap: err_out_free_res: pci_release_regions(pdev); -err_write_cacheline: /* Try to restore it in case the error occurred after we * set it. */