From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>
Subject: Re: [PATCH v1 1/1] mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors()
Date: Thu, 30 Nov 2023 16:44:33 +0200 [thread overview]
Message-ID: <ZWif0YQ/5EFbrA2X@kuha.fi.intel.com> (raw)
In-Reply-To: <20231130143206.1475831-1-andriy.shevchenko@linux.intel.com>
On Thu, Nov 30, 2023 at 04:32:06PM +0200, Andy Shevchenko wrote:
> The pci_alloc_irq_vectors() returns a positive number on success.
> Hence we have to filter the negative numbers for error condition.
> Update the check accordingly.
>
> Fixes: e6951fb78787 ("mfd: intel-lpss: Use PCI APIs instead of dereferencing")
> Reported-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for the quick fix.
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/mfd/intel-lpss-pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
> index 8f5e10817a9c..4621d3950b8f 100644
> --- a/drivers/mfd/intel-lpss-pci.c
> +++ b/drivers/mfd/intel-lpss-pci.c
> @@ -44,7 +44,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
> return ret;
>
> ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
> - if (ret)
> + if (ret < 0)
> return ret;
>
> info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
thanks,
--
heikki
next prev parent reply other threads:[~2023-11-30 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 14:32 Andy Shevchenko
2023-11-30 14:44 ` Heikki Krogerus [this message]
2023-12-01 11:32 ` (subset) " Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWif0YQ/5EFbrA2X@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®