Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4285840pxb; Sun, 14 Feb 2021 05:24:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQv3NfmVGq/JEHTUBxVCI0daTJYByPsMe6JfUPrrvbY3g8CrEkO5MoOoJmpy3v8+O0r23S X-Received: by 2002:a17:906:a3d5:: with SMTP id ca21mr11682313ejb.192.1613309068234; Sun, 14 Feb 2021 05:24:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613309068; cv=none; d=google.com; s=arc-20160816; b=1LEVuKi3kwTHzpTGgoU668weaNaZu9HyXncruFcE8SAB9W4SP9377pUHl28tmE43ux dOnmW01JaGc6F6bOOCocQYTWjDBPozo9wyD3MsQOxUQ1rhWvUF48R2oXOfTQGcpRmuG4 bjK9bCel4ZRrNfEg7FFZVQc89BmQaTENRPJ9bE7QulV+0PDUR7d+ycU35FbMj2jq/ZX4 8k/2TXs/BXA1Uu4l+pyJqF5e0HdaYTO+rWk68sC9Q6UkvFZc++AjVXlJp35Ai608qWaA zObrheB8xeUI7tDQFDSO4oJasNs8uEtErwOnTjO/DjeH+rIvn14YTLBFu5UsezgbRkGE cHlg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oxHKYNM0zj6yA3uWKZadp/9dUeeYDxIwsEZdGz6QAa4=; b=ptxPfQ3ii+a+kU11y8ZrxEMq70D7OyL9kkK+zfIp1R3+Ayb8p4LSxexWyrQC35aQF8 HEVp+MoaYJx/V4pg5M+kmPSu7FWILHGzM6mh6Axw6LMejTWWhw1+YsK8So5LDTpxlJS1 l+qM5ISe/m3gQnjS9mTXt/5p3/AXmw7Sm+emB9tfvpRYS5okMMuUc1bjcyTpJ1mvAwt3 ihriEUJYyfliifxKcXaXuvWNfaWXKAnBfSO1T7m96r2su+AZRx+bc8k1NKfDaNvG4w9m Zr7FI8etucBYupmGVy9cVFsFpmQrivb83bvbXmwEqdlTBR1AHNS8VZkFDT3h4qcPKsvl rE/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ntpKeFkD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si11117298edx.46.2021.02.14.05.24.05; Sun, 14 Feb 2021 05:24:28 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ntpKeFkD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhBNNXB (ORCPT + 99 others); Sun, 14 Feb 2021 08:23:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhBNNWo (ORCPT ); Sun, 14 Feb 2021 08:22:44 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D1CC0613D6; Sun, 14 Feb 2021 05:22:03 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id ba1so2264846plb.1; Sun, 14 Feb 2021 05:22:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oxHKYNM0zj6yA3uWKZadp/9dUeeYDxIwsEZdGz6QAa4=; b=ntpKeFkD+4/O4y2sIqg1HIxb15sooiGVTIGNBxQpozkwb0XwZCjlsj/JWtEWnqX7nJ t4yqfkXqJuw7fEofSpBEK3ILKL7ZupEKSjuvmeUVi5gjpyAwbNfNFUTL9IAF2exK9YI6 IqjLc3SyBWKmfVVQ3iYlwyAMNbJo+uAFIEWoIKxKBzg526CIYZIMWbHSEDDE5yIP2h3X gLy4GXDeLkufGNh+S64G2fSeVu80PEwsRL/MoKXov08mqXQwr+QKSAICSF1CLL5lK9eX alsCd9sjMqVWZBRdBH/HFU/WXxCdXUDloQryF8RjsUDHYYpKJ7QNX+VZpREvVX7C9nQh 7HsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oxHKYNM0zj6yA3uWKZadp/9dUeeYDxIwsEZdGz6QAa4=; b=L5cibxjpkeopnWUCU3Mcjcd3LPQgJWapdSRqvsrmyv/gypo9oph+bgrLxMOVEDUD+u juBFTGtjok2BUHCC4UkRKl+EX6gak5vC3B7wIDTD+pI+8820S7UcGY3vRD7c+q4SWwuL fDvWe2cUVPy/Hdx1Kf+9ivDyqV74Z7/x02dPnEcw88kRt6RY8kV+DotwPBy9lp1m4Gm8 E3vWDXY+8P1QSThfFMe/T4Opr1x/UwmLmGVaWuBH/83VsUcEDZadtwRVSPhis0fMus4k xuXWCs6ConC8fJKpyPF6ULxCo4urixQZEgv3QlpbJP7FnH7xIyUlhoznWNhvUAwM+FDX 492w== X-Gm-Message-State: AOAM532weDj3shhLt1vmU0OUiSTsEn+T4XkxMVgrEUal8eKIg+NPfBO9 te4HcIwIPRauWlGpVRsR3RM= X-Received: by 2002:a17:902:b68a:b029:e3:29cf:3f22 with SMTP id c10-20020a170902b68ab02900e329cf3f22mr8884147pls.78.1613308923127; Sun, 14 Feb 2021 05:22:03 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id d12sm14908942pgm.83.2021.02.14.05.22.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 05:22:02 -0800 (PST) From: Dejin Zheng To: gustavo.pimentel@synopsys.com, vkoul@kernel.org, wangzhou1@hisilicon.com, ftoth@exalondelft.nl, andy.shevchenko@gmail.com, qiuzhenfa@hisilicon.com, dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH 2/3] dmaengine: dw-edma: Add missing call to 'pci_free_irq_vectors()' in probe function Date: Sun, 14 Feb 2021 21:21:52 +0800 Message-Id: <20210214132153.575350-3-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210214132153.575350-1-zhengdejin5@gmail.com> References: <20210214132153.575350-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call to 'pci_free_irq_vectors()' is missing in the error handling path of the probe function, So add it. Fixes: 41aaff2a2ac01c5 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic") Signed-off-by: Dejin Zheng --- drivers/dma/dw-edma/dw-edma-pcie.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c index 1eafc602e17e..c1e796bd3ee9 100644 --- a/drivers/dma/dw-edma/dw-edma-pcie.c +++ b/drivers/dma/dw-edma/dw-edma-pcie.c @@ -185,24 +185,31 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev, /* Validating if PCI interrupts were enabled */ if (!pci_dev_msi_enabled(pdev)) { pci_err(pdev, "enable interrupt failed\n"); - return -EPERM; + err = -EPERM; + goto err_free_irq; } dw->irq = devm_kcalloc(dev, nr_irqs, sizeof(*dw->irq), GFP_KERNEL); - if (!dw->irq) - return -ENOMEM; + if (!dw->irq) { + err = -ENOMEM; + goto err_free_irq; + } /* Starting eDMA driver */ err = dw_edma_probe(chip); if (err) { pci_err(pdev, "eDMA probe failed\n"); - return err; + goto err_free_irq; } /* Saving data structure reference */ pci_set_drvdata(pdev, chip); return 0; + +err_free_irq: + pci_free_irq_vectors(pdev); + return err; } static void dw_edma_pcie_remove(struct pci_dev *pdev) -- 2.25.0