Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4814530pxb; Mon, 15 Feb 2021 01:47:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzO9jaZviEe1S0kHWUsryPiYNKftG+ONJzS4Hhq5zuvsfmMiKnEapks7zKbsCYywDmqp3/E X-Received: by 2002:aa7:c044:: with SMTP id k4mr314763edo.47.1613382428094; Mon, 15 Feb 2021 01:47:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613382428; cv=none; d=google.com; s=arc-20160816; b=wblZOYD0dSVEd3gAWJKz1YZ09VYN52+jtFhBRDIex+v8/irsupTLm7N+hgUA7/qwCX 1TemkhdBsdT2tZQjivcu8yQosx0gUB8sNsL6U0okXYevfaxU1GyPfuOI5FLJbCrpmYJa e6yTh+aQSdBn981oaMlYwu+may7i4rnKaN3uikDfpQqOtnbUYGYCmx1M9zRD/S8flWUL +j8yR4sBqhQpzFmCC1bQuctuhivnH0YCrRVJ4jcOy7r2AhKPkN3XoJq3rJWab3V6j9kh 3sM8DJ0Sh0U+jJfx3/IoIE66nJwvEFDwi+IQqyvVraK3eEuXeuJtGyKR6aAiX7eSuyHi QMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=J3MAJG39KFRO2n/sdb78DmN6opqsIgZ6mZM6tbhNfZ4=; b=ZmicttSd2D7CiWwPtZ02kGo3jyAwDbXq0g4M/w4/+86rsYQUbLqXlH2Kh27+6PJlfr j2YNR74PX2Wmi0qXbpys0YY43azn61P1x+L4lELkzAtGzSC4h30Kt4Tss043U5C2Z2rB Vjcrr3Cz7SRjT8P0ok7lIxUGdBjY+Owf0JbR+ob8Akqorw5GQP1c6WbCyzSL2NFMtxEH dKOL9+Nhw2MBNTxbL3NW6jHW0DzOSxixuQVWq4wQZipwwQamd/dDTI8W9x8Y4sOLHmIg bhV/3/Q89l27utd9zNDBXtLl9PjCbmaDTiKE84wV8SMPBCshHQzjMc8kZakg32AsIOAh 6JrA== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si11908974ejw.219.2021.02.15.01.46.43; Mon, 15 Feb 2021 01:47:08 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbhBOJnn (ORCPT + 99 others); Mon, 15 Feb 2021 04:43:43 -0500 Received: from mga11.intel.com ([192.55.52.93]:32705 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbhBOJnk (ORCPT ); Mon, 15 Feb 2021 04:43:40 -0500 IronPort-SDR: MMWHYJNJAjJgjzvEDIy0srb8pPLvkmKgYxjH0vOhJc3K4mZN2NjP4dNte1L1lzUX5ee1AxeUHP QCSdHK23gwXg== X-IronPort-AV: E=McAfee;i="6000,8403,9895"; a="179143295" X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="179143295" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 01:41:54 -0800 IronPort-SDR: Dk/069UiJ4MpefNYiPyQnQG7aruGvEhg7HrUNxureNlfXmPZ1icBfJEHPQx3m7nt/yT7ENMdYa coAEQtYVnQdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="398994579" Received: from mylly.fi.intel.com (HELO [10.237.72.57]) ([10.237.72.57]) by orsmga008.jf.intel.com with ESMTP; 15 Feb 2021 01:41:51 -0800 Subject: Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()' To: Jan Kiszka , Dejin Zheng , daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, broonie@kernel.org, andriy.shevchenko@linux.intel.com, linux-spi@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <20210214145746.602770-1-zhengdejin5@gmail.com> From: Jarkko Nikula Message-ID: <88dff093-b18f-e23c-9cec-b8623da5857b@linux.intel.com> Date: Mon, 15 Feb 2021 11:41:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Reviewed-by: Jarkko Nikula