Emilio G. Cota
55db50205a
staging: vme_user: return the appropriate error code when module_init fails
When init_module fails, 0 is returned anyway; the module is then installed
and oopses when we try to remove it:
[ 3236.368009] WARNING: at drivers/base/driver.c:262 driver_unregister+0x36/0x6f()
[ 3236.368012] Hardware name:
[ 3236.368014] Unexpected driver unregister!
[ 3236.368016] Modules linked in: vme_user(-) vme_tsi148 vme e1000e iTCO_wdt iTCO_vendor_support [last unloaded: vme]
[ 3236.368027] Pid: 16162, comm: rmmod Not tainted 2.6.35 #2
[ 3236.368029] Call Trace:
[ 3236.368037] [<ffffffff81036ea3>] warn_slowpath_common+0x80/0x98
[ 3236.368044] [<ffffffff81060a65>] ? __try_stop_module+0x0/0x58
[ 3236.368049] [<ffffffff81036f4f>] warn_slowpath_fmt+0x41/0x43
[ 3236.368054] [<ffffffff81060a65>] ? __try_stop_module+0x0/0x58
[ 3236.368059] [<ffffffff811e8f78>] driver_unregister+0x36/0x6f
[ 3236.368066] [<ffffffffa004aa44>] vme_unregister_driver+0xd/0xf [vme]
[ 3236.368072] [<ffffffffa00616c8>] vme_user_exit+0x10/0x1e [vme_user]
[ 3236.368076] [<ffffffff810612c1>] sys_delete_module+0x1ba/0x226
[ 3236.368082] [<ffffffff812d6e14>] ? do_page_fault+0x25d/0x28a
[ 3236.368088] [<ffffffff8100202b>] system_call_fastpath+0x16/0x1b
[ 3236.368092] ---[ end trace cab6d88ebc44c1de ]---
The appended fixes it by returning the appropriate error code in module_init
whenever something goes wrong, thus cancelling the insertion of the module.
Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:40:14 -08:00
..
2010-11-13 09:52:16 -08:00
2010-11-12 17:10:55 -05:00
2010-11-08 12:17:05 -08:00
2010-10-29 15:09:56 -07:00
2010-11-12 08:52:47 -08:00
2010-11-09 01:08:53 -02:00
2010-10-27 14:33:39 +09:00
2010-11-15 13:27:06 -08:00
2010-10-31 10:40:39 -04:00
2010-11-13 09:55:56 -08:00
2010-10-29 14:14:02 -07:00
2010-10-26 10:13:48 -07:00
2010-11-05 14:17:22 -07:00
2010-10-27 18:03:05 -07:00
2010-10-29 00:29:51 +02:00
2010-11-10 11:52:19 +10:00
2010-11-15 21:38:57 +01:00
2010-11-15 22:40:38 +01:00
2010-10-26 10:17:30 -07:00
2010-10-26 17:28:07 -07:00
2010-10-29 04:16:28 -04:00
2010-11-11 01:01:26 -08:00
2010-11-05 15:25:48 -07:00
2010-11-12 07:55:32 -08:00
2010-11-12 07:55:30 -08:00
2010-11-10 14:40:53 +01:00
2010-11-15 22:40:38 +01:00
2010-10-29 00:30:43 +02:00
2010-11-15 22:40:38 +01:00
2010-10-29 00:29:59 +02:00
2010-10-30 08:31:35 -07:00
2010-11-12 17:17:55 -08:00
2010-10-30 11:43:26 -07:00
2010-10-28 09:24:14 -07:00
2010-11-15 14:01:33 -08:00
2010-11-10 14:31:28 +01:00
2010-10-27 18:03:18 -07:00
2010-10-26 17:28:37 -07:00
2010-10-29 00:30:44 +02:00
2010-11-12 07:55:30 -08:00
2010-10-29 00:30:15 +02:00
2010-11-10 18:15:44 +09:00
2010-11-12 17:17:55 -08:00
2010-11-10 14:54:09 +01:00
2010-11-13 09:59:19 -08:00
2010-11-15 14:30:30 +09:00
2010-11-01 07:50:43 -04:00
2010-11-16 11:40:14 -08:00
2010-11-11 11:06:09 -08:00
2010-11-16 10:44:50 -08:00
2010-11-11 07:14:07 -08:00
2010-11-15 14:03:17 -08:00
2010-10-27 18:03:17 -07:00
2010-10-29 19:08:42 +01:00
2010-11-12 16:01:55 -08:00
2010-11-05 08:10:33 -07:00