[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5b63eb4-4168-425e-a235-15cc7a6f2df3@linaro.org>
Date: Thu, 9 Nov 2023 09:40:28 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Corbet <corbet@....net>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 3/4] hwmon: Add support for Amphenol ChipCap 2
On 08/11/2023 17:35, Javier Carrasco wrote:
>>> +
>>> + data->regulator = devm_regulator_get_optional(dev, "vdd");
>>> + if (!IS_ERR(data->regulator)) {
>>> + ret = cc2_retrive_alarm_config(data);
>>> + if (ret)
>>> + goto cleanup;
>>> + } else {
>>> + /* No access to EEPROM without regulator: no alarm control */
>>
>> Test your code with deferred probe. Are you sure you handle it
>> correctly? To me, it looks like you handle deferred probe the same as
>> any error.
>>
> The -EPROBE_DEFER is propagated to the probe function and it is the
> returned value. I clarified the error path in v2 so no error messages
Really?
I see:
if (!IS_ERR(data->regulator)) {
// so you do not go here
} else {
goto dev_register;
}
dev_register is not error path. So how do you return EPROBE_DEFER?
Which line of code does it?
> are displayed in that case, going directly to the dev_err_probe in the
> probe cleanup.
> When the EPROBE_DEFER error is returned, the probe function is deferred
> and called again later on, which is the desired behavior.
>
Best regards,
Krzysztof
Powered by blists - more mailing lists