]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: fsl-mc: section mismatch bug fix
authorLijun Pan <Lijun.Pan@freescale.com>
Sun, 25 Oct 2015 22:41:19 +0000 (17:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 05:40:14 +0000 (14:40 +0900)
WARNING: drivers/staging/built-in.o(.init.text+0xdc): Section mismatch in reference from the function fsl_mc_bus_driver_init() to the function .exit.text:dprc_driver_exit()
The function __init fsl_mc_bus_driver_init() references
a function __exit dprc_driver_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
dprc_driver_exit() so it may be used outside an exit section.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dprc-driver.c
drivers/staging/fsl-mc/include/mc-private.h

index a9ead0d7f9c3f1c0ea72421ad360cc07038f7652..2c4cd70b4cbb98a5fcb37fabae875cd084635866 100644 (file)
@@ -482,7 +482,7 @@ int __init dprc_driver_init(void)
        return fsl_mc_driver_register(&dprc_driver);
 }
 
-void __exit dprc_driver_exit(void)
+void dprc_driver_exit(void)
 {
        fsl_mc_driver_unregister(&dprc_driver);
 }
index 2c4cc794be7abbcc0ede32e5c217806f135c23f8..c706f778626e7e541dd734121b93b2f72665fadf 100644 (file)
@@ -103,7 +103,7 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev);
 
 int __init dprc_driver_init(void);
 
-void __exit dprc_driver_exit(void);
+void dprc_driver_exit(void);
 
 int __init fsl_mc_allocator_driver_init(void);