Skip to content

Commit

Permalink
[S390] cio: Dont call ->release directly.
Browse files Browse the repository at this point in the history
Just put the cdev's reference count to give up our reference.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Dec 25, 2008
1 parent 90ed2b6 commit 283fdd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,8 @@ static int io_subchannel_initialize_dev(struct subchannel *sch,
/* Do first half of device_register. */
device_initialize(&cdev->dev);
if (!get_device(&sch->dev)) {
if (cdev->dev.release)
cdev->dev.release(&cdev->dev);
/* Release reference from device_initialize(). */
put_device(&cdev->dev);
return -ENODEV;
}
return 0;
Expand Down

0 comments on commit 283fdd0

Please sign in to comment.