lkml.org 
[lkml]   [2021]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/2] hwmon: (nct6775) Use sio_data in superio_*().
From
Date
On 9/13/21 1:58 PM, Denis Pauk wrote:
[ ... ]
>>> res = platform_get_resource(pdev, IORESOURCE_IO, 0);
>>> + if (!res)
>>> + return -EBUSY;
>>> +
>>
>> The probe function is triggerered from the init function,
>> which always sets the resource. Please provide evidence explaining
>> why this added check is needed.
>
> Nothing special, because platform_get_resource can return error I have
> added check for result. It can be dropped from patch.
> Should I remove it?
>

Yes: It is unrelated. If needed (ie if a path is shown where platform_get_resource()
returns NULL), it should be a separate patch. Note though that -EBUSY is wrong
either case: The function only returns NULL if it doesn't find the resource.
That is not a "busy" situation.

Thanks,
Guenter

\
 
 \ /
  Last update: 2021-09-13 23:49    [W:0.272 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site