diff options
author | Jeff Dike | 2007-03-29 01:20:28 -0700 |
---|---|---|
committer | Linus Torvalds | 2007-03-29 08:22:24 -0700 |
commit | d40f6d71da81deb66c4fa54b46e22977cdb8b451 (patch) | |
tree | d23894b3d5de54b0559239ae9eecfc91e52082af /arch/um/drivers | |
parent | 2a9529a0c890007ade5425b75272c3def283f8b1 (diff) |
[PATCH] uml: fix device unplug crash
Fix a NULL dereference when unplugging a device. The default value of
err_msg wants to be "" in case the driver doesn't modify it.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 178b2eff4a8c..65ad2932672c 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c @@ -615,6 +615,9 @@ void mconsole_remove(struct mc_request *req) err_msg = NULL; err = (*dev->remove)(n, &err_msg); switch(err){ + case 0: + err_msg = ""; + break; case -ENODEV: if(err_msg == NULL) err_msg = "Device doesn't exist"; |