[PATCH v4 1/3] pps: clients: gpio: propagate probe error codes
From: Farber, Eliav
Date: Tue Sep 22 2026 - 06:48:28 EST
On Mon, Sep 22, 2026 at 10:22:00AM +0200, Rodolfo Giometti wrote:
> On Tue, Sep 22, 2026 at 08:08:09AM +0000, Farber, Eliav wrote:
> > Agreed on silencing the deferral spam. I avoided return
> > dev_err_probe() because patch 3 turns both returns into goto
> > err_release_pins, and dev_err_probe()'s idiom is to return the error, not goto.
>
> You don't have to return it. Calling it just for the message and then
> jumping is fine, and ret already carries the code the label needs:
>
> if (ret < 0) {
> dev_err_probe(dev, ret, "failed to map GPIO to IRQ\n");
> goto err_release_pins;
> }
>
> But please don't open-code it: on the -EPROBE_DEFER branch it also
> calls device_set_deferred_probe_reason(), so the hand-written version
> silently drops the reason from /sys/kernel/debug/devices_deferred.
Done in v5: this patch uses return dev_err_probe(), and the pinctrl patch
turns it into the log-only dev_err_probe() + goto form you show above.
Also dropped the ": %d" from both messages (kept data->irq).
Thanks,
Eliav