summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorAndy Voltz <andy.voltz@timesys.com>2010-11-15 16:00:38 -0500
committerAndy Voltz <andy.voltz@timesys.com>2010-11-17 11:30:34 -0500
commit2e0ae4bf137e282e825b27b02eb46f86c59d004e (patch)
tree7c2534acd757ca414f02c5b983ee67eb2b2493c6 /drivers/s390/cio/device.c
parent22763c5cf3690a681551162c15d34d935308c8d7 (diff)
Bump Linux kernel to 2.6.32.25
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 2490b741e16a..55f997308e42 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1292,7 +1292,7 @@ static int io_subchannel_probe(struct subchannel *sch)
sch->private = kzalloc(sizeof(struct io_subchannel_private),
GFP_KERNEL | GFP_DMA);
if (!sch->private)
- goto out_err;
+ goto out_schedule;
/*
* First check if a fitting device may be found amongst the
* disconnected devices or in the orphanage.
@@ -1317,7 +1317,7 @@ static int io_subchannel_probe(struct subchannel *sch)
}
cdev = io_subchannel_create_ccwdev(sch);
if (IS_ERR(cdev))
- goto out_err;
+ goto out_schedule;
rc = io_subchannel_recog(cdev, sch);
if (rc) {
spin_lock_irqsave(sch->lock, flags);
@@ -1325,9 +1325,7 @@ static int io_subchannel_probe(struct subchannel *sch)
spin_unlock_irqrestore(sch->lock, flags);
}
return 0;
-out_err:
- kfree(sch->private);
- sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
+
out_schedule:
io_subchannel_schedule_removal(sch);
return 0;
@@ -1341,13 +1339,14 @@ io_subchannel_remove (struct subchannel *sch)
cdev = sch_get_cdev(sch);
if (!cdev)
- return 0;
+ goto out_free;
/* Set ccw device to not operational and drop reference. */
spin_lock_irqsave(cdev->ccwlock, flags);
sch_set_cdev(sch, NULL);
cdev->private->state = DEV_STATE_NOT_OPER;
spin_unlock_irqrestore(cdev->ccwlock, flags);
ccw_device_unregister(cdev);
+out_free:
kfree(sch->private);
sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
return 0;