Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4908618pxb; Mon, 15 Feb 2021 04:41:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5RXv/m97VXzwvdtpjtOF+LmNyDL23MlhF6a1NLlr3ZMArziCgvyc000YB7gxuH+YvqD1E X-Received: by 2002:a05:6402:4d3:: with SMTP id n19mr15301919edw.2.1613392887236; Mon, 15 Feb 2021 04:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613392887; cv=none; d=google.com; s=arc-20160816; b=q+OkdIAOmaCXPoLnfJPbDS/57UZXX/dUIKWFPlHGTMjt3dsB2LGUPP+109V7+ZlecJ YrV5N4/TPBKwep302S9hysV/DTfuGsNcOgFkHpZiFZ5H0D1jWvDbB3uHfWCHWpIcmAez 6/ScDrVU1CvraTShc1JTW8KZ0tXdEnyrZPdol8eB4MjqjPstvDRdWDtb25A1jNepEMJ/ YZ271F66Hj+oojVWP6K02Z7l7vw4uqdFGCpnUhBwj8BjTmLHzcc3MwxDPWIQsUkVAd9S v22WrE14wp7lkBdrkTWiipKVgu6KeB7MVdWKN+7KxKMW5Rk/3rymdYuxYF+7mYRgWruG aNtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1x7bFxRMxFkzhQJ3FsPRcWMZwloVqKz9aeYfS9bbHK8=; b=S7fzmZQ2bAPJJX5jW1oEbtsgk1GPqQm32NjO0apK1WwmqdBTq2N1XHPkW18HbbXsEB McVd0p0WkaEVEp1cAMuSlsR//G1CS1OH3aEZ/di41drmeG8UfcIkcrueXFmLxkeeDGAV VT6OXQ9wzFtDzx+8fqdUlv+IpOd4nAmkOkDWWfcdyeq6JJiIYGdUG/MTtES77kdQoZvS j4qWttnUvaV+NP4Yic4fTQTBLLuUpfIEnRtrw5MS7HJpVqM69LNvGbCxN4y1ih6D4jSK ugP2yNiDbg/1DIB6hXzPB9d5hG/ZM3RuPDnHRcHIP+LjmFDYBoosYvrXIHA9W1VL6CGO RyGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="U/6xwuPr"; 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 f22si3844688ejt.521.2021.02.15.04.41.04; Mon, 15 Feb 2021 04:41:27 -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="U/6xwuPr"; 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 S230203AbhBOMjM (ORCPT + 99 others); Mon, 15 Feb 2021 07:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhBOMjJ (ORCPT ); Mon, 15 Feb 2021 07:39:09 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 046BCC061756; Mon, 15 Feb 2021 04:38:26 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id t2so3856092pjq.2; Mon, 15 Feb 2021 04:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1x7bFxRMxFkzhQJ3FsPRcWMZwloVqKz9aeYfS9bbHK8=; b=U/6xwuPrQIky8vio6ycHfVP4qeX0tMrUYsWQc+9WdvWpmTcQjWD3usKTJu1nVUAiam gT0bXalVYLepoqUJ1Xao0hIvz+opYKRiq3VHvVTZwsGYpNlEnaS5FtARzsgsJfSYeUUG /uDLCRh4X+4dDUm+8Gz69QexA50/m2VklYfX1V/k0ilcQCLFjsG+5rWiXq3198Uqa7V9 nO1tib4g2k+1Yy9s03UWsEiZDKhrejCafd6sUzJ2JA7wHGRBioKAX1F7ASd5yOsjr1Hf jLm1pHRA3hdbjUKNUH/G7ERtmItZ+N5KAeesjbEsKMZniQvAS6zi3x1iwOhlRugQafJb dZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1x7bFxRMxFkzhQJ3FsPRcWMZwloVqKz9aeYfS9bbHK8=; b=fKU+xowIiCuRx80tw/zxw5CAvRBuE3oQ40almPEvHXCL623oC0MZ28xmLYoMZgZAZr pXa8bI0C0Xz/QDuSqdTZeqaFuwIcQkTj+cTSLvfFpa5JNyrKmQzNWiCpjMf/8zV3E5Mx 3eXwbBOHURyJ/n8kc4tDNwBSdgDd/39MAXO7jhXfOTgZZDvr4R7lfM5rdoDMcevgutBH l5vu1Pnq2tzitqQEWyaPuhF/ZQHT8KTG0CIQGHGGTsDdfAWhzSdHm+/QZL/FF0MpBC/I ym9UkjxH0PMKL0JuFB+q11AeQOoPnxTOP/2puegNcImghYPawyUFcknHyKx7/h38DlAJ heRg== X-Gm-Message-State: AOAM531VbaQSk04Jir2o9dEFSbstc5EdVZGnev8PdarSJERJISWNR7IW TMYu8VQGPOS42rVOHPyD63A= X-Received: by 2002:a17:90a:4609:: with SMTP id w9mr16583775pjg.69.1613392705533; Mon, 15 Feb 2021 04:38:25 -0800 (PST) Received: from localhost (89.208.244.53.16clouds.com. [89.208.244.53]) by smtp.gmail.com with ESMTPSA id 73sm18413112pfa.27.2021.02.15.04.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 04:38:25 -0800 (PST) Date: Mon, 15 Feb 2021 20:38:23 +0800 From: Dejin Zheng To: Jarkko Nikula Cc: Jan Kiszka , daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, broonie@kernel.org, andriy.shevchenko@linux.intel.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()' Message-ID: <20210215123823.GA618076@nuc8i5> References: <20210214145746.602770-1-zhengdejin5@gmail.com> <88dff093-b18f-e23c-9cec-b8623da5857b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88dff093-b18f-e23c-9cec-b8623da5857b@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 11:41:50AM +0200, Jarkko Nikula wrote: > On 2/15/21 11:23 AM, Jan Kiszka wrote: > > On 14.02.21 15:57, Dejin Zheng wrote: > > > Call to 'pci_free_irq_vectors()' are missing both in the error handling > > > path of the probe function, and in the remove function. So add them. > > > > > > Fixes: 64e02cb0bdfc7c ("spi: pca2xx-pci: Allow MSI") > > > Signed-off-by: Dejin Zheng > > > --- > > > drivers/spi/spi-pxa2xx-pci.c | 13 ++++++++++--- > > > 1 file changed, 10 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c > > > index 14fc41ed2361..1ec840e78ff4 100644 > > > --- a/drivers/spi/spi-pxa2xx-pci.c > > > +++ b/drivers/spi/spi-pxa2xx-pci.c > > > @@ -254,8 +254,10 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev, > > > snprintf(buf, sizeof(buf), "pxa2xx-spi.%d", ssp->port_id); > > > ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0, > > > c->max_clk_rate); > > > - if (IS_ERR(ssp->clk)) > > > - return PTR_ERR(ssp->clk); > > > + if (IS_ERR(ssp->clk)) { > > > + ret = PTR_ERR(ssp->clk); > > > + goto err_irq; > > > + } > > > memset(&pi, 0, sizeof(pi)); > > > pi.fwnode = dev->dev.fwnode; > > > @@ -268,12 +270,16 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev, > > > pdev = platform_device_register_full(&pi); > > > if (IS_ERR(pdev)) { > > > clk_unregister(ssp->clk); > > > - return PTR_ERR(pdev); > > > + ret = PTR_ERR(pdev); > > > + goto err_irq; > > > } > > > pci_set_drvdata(dev, pdev); > > > return 0; > > > +err_irq: > > > + pci_free_irq_vectors(dev); > > > + return ret; > > > } > > > static void pxa2xx_spi_pci_remove(struct pci_dev *dev) > > > @@ -283,6 +289,7 @@ static void pxa2xx_spi_pci_remove(struct pci_dev *dev) > > > spi_pdata = dev_get_platdata(&pdev->dev); > > > + pci_free_irq_vectors(dev); > > > platform_device_unregister(pdev); > > > clk_unregister(spi_pdata->ssp.clk); > > > } > > > > > > > Reviewed-by: Jan Kiszka > > > Please fix pca2xx-pci -> pxa2xx-pci in the subject line. With that change > you may add: Jan and Jarkko, Thanks very much for your review. I will modify the subject name in patch v2, Thanks again! Dejin > > Reviewed-by: Jarkko Nikula