]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mailbox: mailbox-test: Fix debugfs_create_dir error checking
authorHaotian Zhang <vulab@iscas.ac.cn>
Thu, 20 Nov 2025 02:40:39 +0000 (10:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:24:56 +0000 (06:24 +0900)
commitf73d41f2a1d6fff8f4d9fec367bdd85b2bcb5839
tree9ad3ec8044ca69e2385eed04912e161d1660cc80
parent779a422b45d0b7b26cc1bf191a20975480e81dff
mailbox: mailbox-test: Fix debugfs_create_dir error checking

[ Upstream commit 3acf1028f5003731977f750a7070f3321a9cb740 ]

The debugfs_create_dir() function returns ERR_PTR() on error, not NULL.
The current null-check fails to catch errors.

Use IS_ERR() to correctly check for errors.

Fixes: 8ea4484d0c2b ("mailbox: Add generic mechanism for testing Mailbox Controllers")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/mailbox-test.c