Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97166f52 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky
Browse files

[S390] cio: Put referernce on correct device after moving.

parent c619d422
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -875,14 +875,14 @@ void ccw_device_move_to_orphanage(struct work_struct *work)
	if (replacing_cdev) {
	if (replacing_cdev) {
		sch_attach_disconnected_device(sch, replacing_cdev);
		sch_attach_disconnected_device(sch, replacing_cdev);
		/* Release reference from get_disc_ccwdev_by_dev_id() */
		/* Release reference from get_disc_ccwdev_by_dev_id() */
		put_device(&cdev->dev);
		put_device(&replacing_cdev->dev);
		return;
		return;
	}
	}
	replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id);
	replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id);
	if (replacing_cdev) {
	if (replacing_cdev) {
		sch_attach_orphaned_device(sch, replacing_cdev);
		sch_attach_orphaned_device(sch, replacing_cdev);
		/* Release reference from get_orphaned_ccwdev_by_dev_id() */
		/* Release reference from get_orphaned_ccwdev_by_dev_id() */
		put_device(&cdev->dev);
		put_device(&replacing_cdev->dev);
		return;
		return;
	}
	}
	sch_create_and_recog_new_device(sch);
	sch_create_and_recog_new_device(sch);