[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f5651d03-f3ca-e5f9-244c-e4c584d26dc8@roeck-us.net>
Date: Mon, 13 Sep 2021 14:47:53 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Denis Pauk <pauk.denis@...il.com>
Cc: Bernhard Seibold <mail@...nhard-seibold.de>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] hwmon: (nct6775) Use sio_data in superio_*().
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
Powered by blists - more mailing lists