Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 3/4] HID: intel-ish-hid: ipc: Remove redundant dev_err()
Date: Thu, 16 Jul 2026 08:17:18 +0000	[thread overview]
Message-ID: <20260716081718.E307D1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260716075203.593012-4-panchuang@vivo.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Missing call to `pci_free_irq_vectors()` in the error paths of `ish_probe()` after a successful `pci_alloc_irq_vectors()`.
--

--- Patch [3]: [PATCH v2 3/4] HID: intel-ish-hid: ipc: Remove redundant dev_err() ---
commit e6d17c39d85bf24754ef698f7e6d06f53c4283e2
Author: Pan Chuang <panchuang@vivo.com>

HID: intel-ish-hid: ipc: Remove redundant dev_err()
    
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index ed3405c05e73c..cef1030643f15 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -232,10 +232,8 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	ret = devm_request_irq(dev, pdev->irq, ish_irq_handler,
>  			       irq_flag, KBUILD_MODNAME, ishtp);
> -	if (ret) {
> -		dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq);
> +	if (ret)
>  		return ret;

[Severity: High]
This is a pre-existing issue, but does this error path leak the IRQ vectors
allocated earlier in ish_probe()?

If devm_request_irq() fails, the function returns directly. Similarly, if
ish_init() fails further down in ish_probe(), it also returns directly:

    ret = ish_init(ishtp);
    if (ret)
        return ret;

Should there be a call to pci_free_irq_vectors() in these error paths
since pci_alloc_irq_vectors() was successfully called previously?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260716075203.593012-1-panchuang@vivo.com?part=3

  reply	other threads:[~2026-07-16  8:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  7:51 [PATCH v2 0/4] HID: Remove redundant error messages on IRQ request failure Pan Chuang
2026-07-16  7:51 ` [PATCH v2 1/4] HID: amd_sfh: Remove redundant dev_err() Pan Chuang
2026-07-16  7:51 ` [PATCH v2 2/4] HID: hid-goodix: " Pan Chuang
2026-07-16  7:51 ` [PATCH v2 3/4] HID: intel-ish-hid: ipc: " Pan Chuang
2026-07-16  8:17   ` sashiko-bot [this message]
2026-07-16  7:51 ` [PATCH v2 4/4] HID: Intel-thc-hid: " Pan Chuang
2026-07-16  8:33   ` sashiko-bot

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=20260716081718.E307D1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=panchuang@vivo.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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