[S390] cio: Dont call ->release directly.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 25 Dec 2008 12:39:10 +0000 (13:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:09 +0000 (13:39 +0100)
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>
drivers/s390/cio/device.c

index 2d31f06a913e9d632f55df80f2fb66cbe9e21719..f831b6465c600293eb30054a2deaf1cbc762acfb 100644 (file)
@@ -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;