aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/s390/cio/vfio_ccw_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/vfio_ccw_drv.c')
-rw-r--r--drivers/s390/cio/vfio_ccw_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 914dde041675..6ff5c9cfb7ed 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -171,7 +171,7 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
return -ENODEV;
}
- parent = kzalloc(struct_size(parent, mdev_types, 1), GFP_KERNEL);
+ parent = kzalloc(sizeof(*parent), GFP_KERNEL);
if (!parent)
return -ENOMEM;
@@ -186,10 +186,10 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
parent->mdev_type.sysfs_name = "io";
parent->mdev_type.pretty_name = "I/O subchannel (Non-QDIO)";
- parent->mdev_types[0] = &parent->mdev_type;
+ parent->mdev_types = &parent->mdev_type;
ret = mdev_register_parent(&parent->parent, &sch->dev,
&vfio_ccw_mdev_driver,
- parent->mdev_types, 1);
+ &parent->mdev_types, 1);
if (ret)
goto out_unreg;