Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp940672ybj; Fri, 20 Sep 2019 02:28:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8sV1+WIBr9dcXN355XROgfup83pmrpNqOXZax/pwwSjBpQN3kwMO3/Uh0iGeScMtsiCEq X-Received: by 2002:a50:e719:: with SMTP id a25mr20817918edn.258.1568971700049; Fri, 20 Sep 2019 02:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568971700; cv=none; d=google.com; s=arc-20160816; b=tfcbUAh1JQf7Pi8KTcsIrsT+F/IbwHJO9ayZGApHiHTEeKvzAYynL80CDO8bAEzh1t qpb0dyySrQD2PoxdkA7bbyaeoRTX+xF2W/aLIFsKWSpRKP1zqjdQv8JMiqr4Y8RHHGQ1 Y1v2OtqeblyI39FXw8DxU1QBpv6OneIs+LMyMmZQHC+d5/M9PCBknho2GzE9dxdcT+ru JmuC+tfU5WyWrWm5yBteNxt34HWvDRE0qOz5xVu3sdhUDK7Ypv2VBZSTuBdp/g25Ldft JPffphQjTnjf0xn3ZzvZcDQVRgCdVu4iFQpLnd0n7xZEDhL4+9CnuApvyni5rrJj1HqG o4kA== 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=uROu0RC6RFQW92O6Q+cCVb7X2vnFxtQOZ0pbjKKJCg8=; b=n1Jx67qDlR0w6sAhuogTgqlrnokidX48h7sRloRdi8djpArq4rhrCT2QbHEjKlfCJc L0zdNu7ZTAMfw3erBQkG3J/C59yilzt3CsAEQANrW12Wgw81IH6vBSN0fx1v/o3IQi+X +PJZWZvdYo1IrwLrqtWFfix4oNxyBDNNP70yt/tUAWv+FzVSp+3smPX190WFObrIqmcw 4yg9Xb2AUQF29+pq3MT7/b/6D3kfhebS1wZ5bvBerH4OFWggNoC/6ZeStPpYI5BIJNyQ WLYXrn3NrU4Llm2qkfjQjJ13n+ZhFDYIitzDOiTM0INWxjiVs59sguDuopMF57L40fpi ZEpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2SSRjD7U; 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 d58si963872eda.62.2019.09.20.02.27.57; Fri, 20 Sep 2019 02:28:20 -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; dkim=pass header.i=@kernel.org header.s=default header.b=2SSRjD7U; 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 S2405861AbfISWLi (ORCPT + 99 others); Thu, 19 Sep 2019 18:11:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:50310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391879AbfISWLg (ORCPT ); Thu, 19 Sep 2019 18:11:36 -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 09FC721907; Thu, 19 Sep 2019 22:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931095; bh=7jrej0KAdtSGw1xy2W0LyObM7950SsjKvp9AEmqT/q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2SSRjD7Ub6f7aoWCQW1iZtkmNpJna5+Xsltvxkda8yPy7XHK35/t2Zha11MEiWqsW z98OdghIBB6M3uiqYX903PsAEPfh/a5APthu0fGZR+ttZ2kZdW6DRQyxq9VzrwTJj7 JLKRYZKEDcgnwJ3fCFImRJD5qKJ12orjcnMOctDs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , "David S. Miller" , Sasha Levin Subject: [PATCH 5.2 107/124] enetc: Add missing call to pci_free_irq_vectors() in probe and remove functions Date: Fri, 20 Sep 2019 00:03:15 +0200 Message-Id: <20190919214823.087474354@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214819.198419517@linuxfoundation.org> References: <20190919214819.198419517@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: Christophe JAILLET [ Upstream commit dd7078f05e1b774a9e8c9f117101d97e4ccd0691 ] Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. Add them. Fixes: 19971f5ea0ab ("enetc: add PTP clock driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c index 8c1497e7d9c5c..aa31948eac644 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c @@ -79,7 +79,7 @@ static int enetc_ptp_probe(struct pci_dev *pdev, n = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX); if (n != 1) { err = -EPERM; - goto err_irq; + goto err_irq_vectors; } ptp_qoriq->irq = pci_irq_vector(pdev, 0); @@ -103,6 +103,8 @@ static int enetc_ptp_probe(struct pci_dev *pdev, err_no_clock: free_irq(ptp_qoriq->irq, ptp_qoriq); err_irq: + pci_free_irq_vectors(pdev); +err_irq_vectors: iounmap(base); err_ioremap: kfree(ptp_qoriq); @@ -120,6 +122,7 @@ static void enetc_ptp_remove(struct pci_dev *pdev) struct ptp_qoriq *ptp_qoriq = pci_get_drvdata(pdev); ptp_qoriq_free(ptp_qoriq); + pci_free_irq_vectors(pdev); kfree(ptp_qoriq); pci_release_mem_regions(pdev); -- 2.20.1