Re: [PATCH v5 1/2] hwmon: (nct6775) Use sio_data in superio_*().

From: Guenter Roeck
Date: Mon Sep 13 2021 - 17:48:08 EST


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