Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173226
b: refs/heads/master
c: 48e4c38
h: refs/heads/master
v: v3
  • Loading branch information
Peter Oberparleiter authored and Martin Schwidefsky committed Dec 7, 2009
1 parent c89bf4f commit 1136583
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf87b7439ec81b9374e7772e44e9cb2eb9e57160
refs/heads/master: 48e4c385c5f54626651cca027afe242439281899
11 changes: 5 additions & 6 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -1317,17 +1317,15 @@ 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);
io_subchannel_recog_done(cdev);
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;
Expand All @@ -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;
Expand Down

0 comments on commit 1136583

Please sign in to comment.