Thread (4 messages) 4 messages, 2 authors, 2021-09-21

Re: [PATCHv2] regulator: pwm-regulator: Make use of the helper function dev_err_probe()

flat view

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: 2021-09-21 19:28:21
Also in: linux-amlogic, lkml

Hi Anand,

On Tue, Sep 21, 2021 at 9:21 PM Anand Moon [off-list ref] wrote:
[...]
quoted
quoted
-                       dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);
-               return ret;
+               return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->pwm),
+                                    "Failed to register regulator %s\n",
The message here should still be similar to the original one since the
actual problem is that we could not get a reference to the PWM
controller. At this point we are not trying to register the
pwm-regulator yet.
Yep, Typo I mixed up the logs completely.
it should be  "Failed to get PWM, deferring probe"
I think it should only be "Failed to get PWM" only - without "deferring probe".
If the PWM is missing in .dts (which is not valid but might happen for
someone who's creating a new .dts) then the "deferring probe" part is
not correct as the error code is not -EPROBE_DEFER (it may be -ENOENT
instead - or similar).


Best regards,
Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help