From 97166f52fc84c0bc49c7dbba2a26720110acb458 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Thu, 25 Dec 2008 13:39:05 +0100 Subject: [S390] cio: Put referernce on correct device after moving. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index fc0c0abd127..647cbaca298 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -875,14 +875,14 @@ void ccw_device_move_to_orphanage(struct work_struct *work) if (replacing_cdev) { sch_attach_disconnected_device(sch, replacing_cdev); /* Release reference from get_disc_ccwdev_by_dev_id() */ - put_device(&cdev->dev); + put_device(&replacing_cdev->dev); return; } replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); if (replacing_cdev) { sch_attach_orphaned_device(sch, replacing_cdev); /* Release reference from get_orphaned_ccwdev_by_dev_id() */ - put_device(&cdev->dev); + put_device(&replacing_cdev->dev); return; } sch_create_and_recog_new_device(sch); -- cgit v1.2.3