diff options
author | Pierre Morel <pmorel@linux.ibm.com> | 2018-10-25 19:15:20 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-11-13 11:45:17 +0100 |
commit | 55e93ecdc1ef9256279e0a0b08edf72cc47fc2f6 (patch) | |
tree | f645f3bbe8bfc437e0786b5afcea1053305dacc9 /drivers/s390/cio | |
parent | 52df7837560e51a47903b49243291fb8039653d2 (diff) | |
download | linux-55e93ecdc1ef9256279e0a0b08edf72cc47fc2f6.tar.bz2 |
vfio: ccw: Register mediated device once all structures are initialized
Let's register the mediated device when all the data structures
which could be used are initialized.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <1540487720-11634-3-git-send-email-pmorel@linux.ibm.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/vfio_ccw_drv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c index edbf542d82af..a10cec0e86eb 100644 --- a/drivers/s390/cio/vfio_ccw_drv.c +++ b/drivers/s390/cio/vfio_ccw_drv.c @@ -134,14 +134,14 @@ static int vfio_ccw_sch_probe(struct subchannel *sch) if (ret) goto out_free; - ret = vfio_ccw_mdev_reg(sch); - if (ret) - goto out_disable; - INIT_WORK(&private->io_work, vfio_ccw_sch_io_todo); atomic_set(&private->avail, 1); private->state = VFIO_CCW_STATE_STANDBY; + ret = vfio_ccw_mdev_reg(sch); + if (ret) + goto out_disable; + return 0; out_disable: |