All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Chen Ni <nichen@iscas.ac.cn>,
	jikos@kernel.org, bentiss@kernel.org,  even.xu@intel.com,
	lixu.zhang@intel.com, kai.heng.feng@canonical.com,
	 hongyan.song@intel.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors
Date: Thu, 02 May 2024 08:23:51 -0700	[thread overview]
Message-ID: <95fadbf4772d575bff777ddb738cb6c25b85b779.camel@linux.intel.com> (raw)
In-Reply-To: <20240429085422.2434036-1-nichen@iscas.ac.cn>

On Mon, 2024-04-29 at 16:54 +0800, Chen Ni wrote:
> Add check for the return value of pci_alloc_irq_vectors() and return
> the error if it fails in order to catch the error.
> 
You can write as
"
Add a check for the return value of pci_alloc_irq_vectors() and return
error if it fails.
"

Thanks,
Srinivas

> Fixes: 74fbc7d371d9 ("HID: intel-ish-hid: add MSI interrupt support")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/hid/intel-ish-hid/ipc/pci-ish.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index e79d72f7db2a..9b9bc58f0524 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -174,6 +174,11 @@ static int ish_probe(struct pci_dev *pdev, const
> struct pci_device_id *ent)
>  
>         /* request and enable interrupt */
>         ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
> +       if (ret < 0) {
> +               dev_err(dev, "ISH: Failed to allocate IRQ
> vectors\n");
> +               return ret;
> +       }
> +
>         if (!pdev->msi_enabled && !pdev->msix_enabled)
>                 irq_flag = IRQF_SHARED;
>  


  reply	other threads:[~2024-05-02 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  8:54 [PATCH] HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors Chen Ni
2024-05-02 15:23 ` srinivas pandruvada [this message]
2024-05-06 21:11   ` Jiri Kosina
2024-05-06 21:52     ` srinivas pandruvada
2024-05-06 21:55       ` Jiri Kosina

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=95fadbf4772d575bff777ddb738cb6c25b85b779.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=bentiss@kernel.org \
    --cc=even.xu@intel.com \
    --cc=hongyan.song@intel.com \
    --cc=jikos@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    --cc=nichen@iscas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.