]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] cio: Put referernce on correct device after moving.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 25 Dec 2008 12:39:05 +0000 (13:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:07 +0000 (13:39 +0100)
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 fc0c0abd12712d8e95247f36abde659ddfed3aa0..647cbaca298e98ad8032642fcd64439a86a332a1 100644 (file)
@@ -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);