Skip to content

Commit fea572d

Browse files
arndbgregkh
authored andcommitted
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: 33aa8d4 ("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>
1 parent 785c193 commit fea572d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/staging/emxx_udc/emxx_udc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,7 +3181,7 @@ static const struct {
31813181
};
31823182

31833183
/*-------------------------------------------------------------------------*/
3184-
static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc)
3184+
static void nbu2ss_drv_ep_init(struct nbu2ss_udc *udc)
31853185
{
31863186
int i;
31873187

@@ -3211,7 +3211,7 @@ static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc)
32113211

32123212
/*-------------------------------------------------------------------------*/
32133213
/* platform_driver */
3214-
static int __init nbu2ss_drv_contest_init(
3214+
static int nbu2ss_drv_contest_init(
32153215
struct platform_device *pdev,
32163216
struct nbu2ss_udc *udc)
32173217
{

0 commit comments

Comments
 (0)