public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: lee@kernel.org, mika.westerberg@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: intel-lpss: Add check for platform_get_irq
Date: Tue, 31 Oct 2023 12:34:33 +0200	[thread overview]
Message-ID: <ZUDYOa0hrc5qif4k@smile.fi.intel.com> (raw)
In-Reply-To: <20231031063642.3041682-1-nichen@iscas.ac.cn>

On Tue, Oct 31, 2023 at 06:36:42AM +0000, Chen Ni wrote:
> The platform_get_irq() might be failed and return a negative result.
> So there should have an error handling code.

NAK.

Have you checked the implementation of intel_lpcc_probe()?

> Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")

It does not fix anything, except maybe an error code.
Also it misses PCI counterpart.

...

That said, I would expect that in intel_lpss_probe() the unset / erroneous IRQ
(which actually shouldn't be checked against 0 at all) should be returned as is.


i.e.

	if (!info || !info->mem || info->irq <= 0)
		return -EINVAL;

be converted to

	if (!info || !info->mem)
		return -EINVAL;

	if (info->irq < 0)
		return info->irq;

That kind of patch I will accept.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2023-10-31 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  6:36 [PATCH] mfd: intel-lpss: Add check for platform_get_irq Chen Ni
2023-10-31 10:34 ` Andy Shevchenko [this message]

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=ZUDYOa0hrc5qif4k@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox