Re: [PATCH 6/6] mshv: unmap debugfs stats pages on kexec

From: Jork Loeser

Date: Wed Apr 01 2026 - 14:03:56 EST


On Mon, 30 Mar 2026, Stanislav Kinsburskii wrote:

diff --git a/drivers/hv/mshv_debugfs.c b/drivers/hv/mshv_debugfs.c
[...]
+++ b/drivers/hv/mshv_debugfs.c
@@ -676,8 +676,10 @@ int __init mshv_debugfs_init(void)
nit: this should allow to avoid setting mshv_debugfs to NULL in the
error path of mshv_debugfs_init():

if (!IS_ERR_OR_NULL(mshv_debugfs))

Yes, of course one could. Though a permanent ERR_PTR in a global variable to indicate init-problems feels off to me. NULL for "not there" seems more canonical, no?

Best,
Jork