Re: [PATCH 1/3] mailbox: mailbox-test: handle channel errors consistently
From: Geert Uytterhoeven
Date: Thu Apr 16 2026 - 09:29:24 EST
On Thu, 16 Apr 2026 at 14:45, Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> mbox_test_request_channel() returns either an ERR_PTR or NULL. The
> callers, however, mostly checked for non-NULL which allows for bogus
> code paths when an ERR_PTR is treated like a valid channel. A later
> commit tried to fix it in one place but missed the other ones. Because
> the ERR_PTR is only used for -ENOMEM once and is converted to
> -EPROBE_DEFER anyhow, convert the callee to only return NULL which
> simplifies handling a lot and makes it less error prone.
>
> Fixes: 8ea4484d0c2b ("mailbox: Add generic mechanism for testing Mailbox Controllers")
> Fixes: 9b63a810c6f9 ("mailbox: mailbox-test: Fix an error check in mbox_test_probe()")
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds