From: Lee Jones <lee@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource
Date: Mon, 27 Nov 2023 08:53:56 +0000 [thread overview]
Message-ID: <20231127085356.GD1470173@google.com> (raw)
In-Reply-To: <ZWDhpZLCZ5xz1RKR@smile.fi.intel.com>
On Fri, 24 Nov 2023, Andy Shevchenko wrote:
> On Fri, Jun 09, 2023 at 09:48:18AM +0800, Jiasheng Jiang wrote:
> > Add the missing check for platform_get_resource and return error
> > if it fails.
>
> > Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")
>
> This does not fix anything and just introduces a duplication code.
> I would like this to be reverted. Should I send one?
Checking this value at the source of obtention and providing and earlier
return with arguably a better return value, all at the cost of an
inexpensive pointer comparison to NULL doesn't sound like a terrible
idea.
If you were committed to the idea of removing it, which I suggest you
reconsider, I would insist that you replace it with at least a comment.
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2023-11-27 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 1:48 [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource Jiasheng Jiang
2023-06-09 6:38 ` Lee Jones
2023-11-24 17:47 ` Andy Shevchenko
2023-11-27 8:53 ` Lee Jones [this message]
2023-11-27 12:50 ` Andy Shevchenko
2023-11-30 11:35 ` 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=20231127085356.GD1470173@google.com \
--to=lee@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=jiasheng@iscas.ac.cn \
--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