lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] mtd: spi-nor: fix memory leak when using debugfs_lookup()
> +static void __exit spi_nor_module_exit(void)
> +{
> + spi_nor_debugfs_shutdown();
> + spi_mem_driver_unregister(&spi_nor_driver);

Hm, does the order matter here? I didn't test it, but this will
lead to:

rootdir = debugfs_create_dir("spi-nor", NULL);
nor->debugfs_root = debugfs_create_dir("spi0", rootdir);
debugfs_remove(rootdir);
debugfs_remove(nor->debugfs_root);

If that's ok, then this looks good.

-michael

\
 
 \ /
  Last update: 2023-03-27 00:15    [W:0.401 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site