Loading
mailbox: mailbox-test: handle channel errors consistently
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: 8ea4484d ("mailbox: Add generic mechanism for testing Mailbox Controllers") Fixes: 9b63a810 ("mailbox: mailbox-test: Fix an error check in mbox_test_probe()") Signed-off-by:Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Jassi Brar <jassisinghbrar@gmail.com>