@@ -457,7 +457,7 @@ static int sas_ex_general(struct domain_device *dev)
if (!rg_req)
return -ENOMEM;
- rg_resp = alloc_smp_resp(RG_RESP_SIZE);
+ rg_resp = alloc_smp_resp(sizeof(struct smp_resp));
if (!rg_resp) {
kfree(rg_req);
return -ENOMEM;
@@ -1688,7 +1688,7 @@ static int sas_get_phy_change_count(struct domain_device *dev,
int res;
struct smp_resp *disc_resp;
- disc_resp = alloc_smp_resp(DISCOVER_RESP_SIZE);
+ disc_resp = alloc_smp_resp(sizeof(struct smp_resp));
if (!disc_resp)
return -ENOMEM;
@@ -1766,7 +1766,7 @@ static int sas_get_ex_change_count(struct domain_device *dev, int *ecc)
if (!rg_req)
return -ENOMEM;
- rg_resp = alloc_smp_resp(RG_RESP_SIZE);
+ rg_resp = alloc_smp_resp(sizeof(struct smp_resp));
if (!rg_resp) {
kfree(rg_req);
return -ENOMEM;