]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mailbox: mailbox-test: initialize struct earlier
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 17 Apr 2026 07:42:35 +0000 (09:42 +0200)
committerJassi Brar <jassisinghbrar@gmail.com>
Sat, 18 Apr 2026 18:10:14 +0000 (13:10 -0500)
commitbbcf9af68bfedb3d9cc3c7eae62f5c844d8b78b9
tree16e7bd33781c8c738695fd5d6f8c638160a6d8d4
parent88ebadbf0deefdaccdab868b44ff70a0a257f473
mailbox: mailbox-test: initialize struct earlier

The waitqueue must be initialized before the debugfs files are created
because from that time, requests from userspace can already be made.
Similarily, drvdata and spinlock needs to be initialized before we
request the channel, otherwise dangling irqs might run into problems
like a NULL pointer exception.

Fixes: 8ea4484d0c2b ("mailbox: Add generic mechanism for testing Mailbox Controllers")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/mailbox-test.c