From: Cornelia Huck Date: Thu, 25 Dec 2008 12:39:10 +0000 (+0100) Subject: [S390] cio: Dont call ->release directly. X-Git-Tag: v2.6.29-rc1~584^2~45 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=283fdd0b8ab102080dbffe4bcaae245f9ceda184;p=linux-2.6-omap-h63xx.git [S390] cio: Dont call ->release directly. Just put the cdev's reference count to give up our reference. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 2d31f06a913..f831b6465c6 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -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;