diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-03-29 01:20:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-29 08:22:24 -0700 |
commit | d40f6d71da81deb66c4fa54b46e22977cdb8b451 (patch) | |
tree | d23894b3d5de54b0559239ae9eecfc91e52082af /arch | |
parent | 2a9529a0c890007ade5425b75272c3def283f8b1 (diff) | |
download | linux-3.10-d40f6d71da81deb66c4fa54b46e22977cdb8b451.tar.gz linux-3.10-d40f6d71da81deb66c4fa54b46e22977cdb8b451.tar.bz2 linux-3.10-d40f6d71da81deb66c4fa54b46e22977cdb8b451.zip |
[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')
-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 178b2eff4a8..65ad2932672 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"; |