lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource
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 [李琼斯]

\
 
 \ /
  Last update: 2023-11-27 09:54    [W:0.085 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site