diff options
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_scsih.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 0274ac3c533b..08a95b2a2f2e 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c | |||
@@ -1163,7 +1163,8 @@ _scsih_target_alloc(struct scsi_target *starget) | |||
1163 | unsigned long flags; | 1163 | unsigned long flags; |
1164 | struct sas_rphy *rphy; | 1164 | struct sas_rphy *rphy; |
1165 | 1165 | ||
1166 | sas_target_priv_data = kzalloc(sizeof(struct scsi_target), GFP_KERNEL); | 1166 | sas_target_priv_data = kzalloc(sizeof(*sas_target_priv_data), |
1167 | GFP_KERNEL); | ||
1167 | if (!sas_target_priv_data) | 1168 | if (!sas_target_priv_data) |
1168 | return -ENOMEM; | 1169 | return -ENOMEM; |
1169 | 1170 | ||
@@ -1277,7 +1278,8 @@ _scsih_slave_alloc(struct scsi_device *sdev) | |||
1277 | struct _sas_device *sas_device; | 1278 | struct _sas_device *sas_device; |
1278 | unsigned long flags; | 1279 | unsigned long flags; |
1279 | 1280 | ||
1280 | sas_device_priv_data = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); | 1281 | sas_device_priv_data = kzalloc(sizeof(*sas_device_priv_data), |
1282 | GFP_KERNEL); | ||
1281 | if (!sas_device_priv_data) | 1283 | if (!sas_device_priv_data) |
1282 | return -ENOMEM; | 1284 | return -ENOMEM; |
1283 | 1285 | ||