|
@@ -1163,7 +1163,8 @@ _scsih_target_alloc(struct scsi_target *starget)
|
|
|
unsigned long flags;
|
|
|
struct sas_rphy *rphy;
|
|
|
|
|
|
- sas_target_priv_data = kzalloc(sizeof(struct scsi_target), GFP_KERNEL);
|
|
|
+ sas_target_priv_data = kzalloc(sizeof(*sas_target_priv_data),
|
|
|
+ GFP_KERNEL);
|
|
|
if (!sas_target_priv_data)
|
|
|
return -ENOMEM;
|
|
|
|
|
@@ -1277,7 +1278,8 @@ _scsih_slave_alloc(struct scsi_device *sdev)
|
|
|
struct _sas_device *sas_device;
|
|
|
unsigned long flags;
|
|
|
|
|
|
- sas_device_priv_data = kzalloc(sizeof(struct scsi_device), GFP_KERNEL);
|
|
|
+ sas_device_priv_data = kzalloc(sizeof(*sas_device_priv_data),
|
|
|
+ GFP_KERNEL);
|
|
|
if (!sas_device_priv_data)
|
|
|
return -ENOMEM;
|
|
|
|