Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d40f6d71 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

[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: default avatarJeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2a9529a0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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";