diff options
Diffstat (limited to 'drivers/s390/block/dcssblk.c')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 44133250da2e..be9b05347b4f 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -388,12 +388,11 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char | |||
388 | /* | 388 | /* |
389 | * get a struct dcssblk_dev_info | 389 | * get a struct dcssblk_dev_info |
390 | */ | 390 | */ |
391 | dev_info = kmalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL); | 391 | dev_info = kzalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL); |
392 | if (dev_info == NULL) { | 392 | if (dev_info == NULL) { |
393 | rc = -ENOMEM; | 393 | rc = -ENOMEM; |
394 | goto out; | 394 | goto out; |
395 | } | 395 | } |
396 | memset(dev_info, 0, sizeof(struct dcssblk_dev_info)); | ||
397 | 396 | ||
398 | strcpy(dev_info->segment_name, local_buf); | 397 | strcpy(dev_info->segment_name, local_buf); |
399 | strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE); | 398 | strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE); |