diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-12-16 04:09:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-14 08:00:20 -0400 |
commit | 170e0abd886bd0ce5676e6393aab4b0148549d50 (patch) | |
tree | 0647a0c2f1f9c8290fdca7ac4d0958c8a96588bc | |
parent | d8e94d091376302064c85c60e922065fca1c2c6b (diff) |
staging: emxx_udc: remove incorrect __init annotations
commit 4f3445067d5f78fb8d1970b02610f85c2f377ea4 upstream.
The probe function is not marked __init, but some other functions
are. This leads to a warning on older compilers (e.g. gcc-4.3),
and can cause executing freed memory when built with those
compilers:
WARNING: drivers/staging/emxx_udc/emxx_udc.o(.text+0x2d78): Section mismatch in reference from the function nbu2ss_drv_probe() to the function .init.text:nbu2ss_drv_contest_init()
This removes the annotations.
Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/emxx_udc/emxx_udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index c3e298843b43..1055649f034c 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c | |||
@@ -3160,7 +3160,7 @@ static const struct { | |||
3160 | }; | 3160 | }; |
3161 | 3161 | ||
3162 | /*-------------------------------------------------------------------------*/ | 3162 | /*-------------------------------------------------------------------------*/ |
3163 | static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc) | 3163 | static void nbu2ss_drv_ep_init(struct nbu2ss_udc *udc) |
3164 | { | 3164 | { |
3165 | int i; | 3165 | int i; |
3166 | 3166 | ||
@@ -3191,7 +3191,7 @@ static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc) | |||
3191 | 3191 | ||
3192 | /*-------------------------------------------------------------------------*/ | 3192 | /*-------------------------------------------------------------------------*/ |
3193 | /* platform_driver */ | 3193 | /* platform_driver */ |
3194 | static int __init nbu2ss_drv_contest_init( | 3194 | static int nbu2ss_drv_contest_init( |
3195 | struct platform_device *pdev, | 3195 | struct platform_device *pdev, |
3196 | struct nbu2ss_udc *udc) | 3196 | struct nbu2ss_udc *udc) |
3197 | { | 3197 | { |