diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2015-02-05 22:12:42 -0800 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-02-23 13:13:07 +0100 |
commit | c6b97bcf8e3ee6643a7f90a54d1ef3f9e12ec245 (patch) | |
tree | e95d43f3b02159c2f70e2fbbdd564415509173c9 /drivers/edac/edac_mc_sysfs.c | |
parent | fc7cc6b7820b54119821a3c6838ff583d796a2ab (diff) | |
download | blackbird-obmc-linux-c6b97bcf8e3ee6643a7f90a54d1ef3f9e12ec245.tar.gz blackbird-obmc-linux-c6b97bcf8e3ee6643a7f90a54d1ef3f9e12ec245.zip |
EDAC: Properly unwind on failure path in edac_init()
edac_init() does not deallocate already allocated resources on failure
path.
Found by Linux Driver Verification project (linuxtesting.org).
[ Boris: The unwind path functions have __exit annotation but are being
used in an __init function, leading to section mismatches. Drop the
section annotation and make them normal functions. ]
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Link: http://lkml.kernel.org/r/1423203162-26368-1-git-send-email-khoroshilov@ispras.ru
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 3a283819970b..112d63ad1154 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -914,7 +914,7 @@ int __init edac_debugfs_init(void) return 0; } -void __exit edac_debugfs_exit(void) +void edac_debugfs_exit(void) { debugfs_remove(edac_debugfs); } @@ -1155,7 +1155,7 @@ int __init edac_mc_sysfs_init(void) return err; } -void __exit edac_mc_sysfs_exit(void) +void edac_mc_sysfs_exit(void) { device_unregister(mci_pdev); edac_put_sysfs_subsys(); |