From: Christian Borntraeger Date: Mon, 5 Nov 2007 10:10:08 +0000 (+0100) Subject: [S390] Fix smsgiucv init on no iucv machines X-Git-Tag: v2.6.24-rc2~32^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fc3ddd67a6781238b038165d9dd8c1f9ba81111;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [S390] Fix smsgiucv init on no iucv machines smsgiucv is a driver that relies on iucv to work properly. If iucv ans smsgiucv are compiled into the kernel and run on an lpar the following scenario happens: iucv is initialized early as a subsystem. It checks for z/VM and returns with EPROTONOTSUPPORT. Later smsgiucv tries to run driver_register with iucv_bus as bus. As this bus is not initialized the driver core and list debugging issue several warnings and oopses. Solution is to let smsgiucv also check for z/VM and return EPROTONOTSUPPORT as well. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 3ccca58..47bb47b 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c @@ -148,6 +148,10 @@ static int __init smsg_init(void) { int rc; + if (!MACHINE_IS_VM) { + rc = -EPROTONOSUPPORT; + goto out; + } rc = driver_register(&smsg_driver); if (rc != 0) goto out;