diff options
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index afc4e88551ad..8e3053c2a451 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -826,17 +826,15 @@ io_subchannel_probe (struct subchannel *sch) | |||
826 | get_device(&cdev->dev); | 826 | get_device(&cdev->dev); |
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | cdev = kmalloc (sizeof(*cdev), GFP_KERNEL); | 829 | cdev = kzalloc (sizeof(*cdev), GFP_KERNEL); |
830 | if (!cdev) | 830 | if (!cdev) |
831 | return -ENOMEM; | 831 | return -ENOMEM; |
832 | memset(cdev, 0, sizeof(struct ccw_device)); | 832 | cdev->private = kzalloc(sizeof(struct ccw_device_private), |
833 | cdev->private = kmalloc(sizeof(struct ccw_device_private), | ||
834 | GFP_KERNEL | GFP_DMA); | 833 | GFP_KERNEL | GFP_DMA); |
835 | if (!cdev->private) { | 834 | if (!cdev->private) { |
836 | kfree(cdev); | 835 | kfree(cdev); |
837 | return -ENOMEM; | 836 | return -ENOMEM; |
838 | } | 837 | } |
839 | memset(cdev->private, 0, sizeof(struct ccw_device_private)); | ||
840 | atomic_set(&cdev->private->onoff, 0); | 838 | atomic_set(&cdev->private->onoff, 0); |
841 | cdev->dev = (struct device) { | 839 | cdev->dev = (struct device) { |
842 | .parent = &sch->dev, | 840 | .parent = &sch->dev, |