Skip to content

Commit 5e56bc0

Browse files
cgrogregkh
authored andcommitted
most: core: use function subsys_initcall()
This patch replaces function module_init() with subsys_initcall(). It is needed to ensure that the core module of the driver is initialized before a component tries to register with the core. This leads to a NULL pointer dereference if the driver is configured as in-tree. Signed-off-by: Christian Gromm <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 522587e commit 5e56bc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/most/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ static void __exit most_exit(void)
14831483
ida_destroy(&mdev_id);
14841484
}
14851485

1486-
module_init(most_init);
1486+
subsys_initcall(most_init);
14871487
module_exit(most_exit);
14881488
MODULE_LICENSE("GPL");
14891489
MODULE_AUTHOR("Christian Gromm <[email protected]>");

0 commit comments

Comments
 (0)