diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 0dfd97e7e96c..d9b9a008d36d 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -667,6 +667,8 @@ static struct domain_device *sas_ex_discover_end_dev( | |||
667 | return child; | 667 | return child; |
668 | 668 | ||
669 | out_list_del: | 669 | out_list_del: |
670 | sas_rphy_free(child->rphy); | ||
671 | child->rphy = NULL; | ||
670 | list_del(&child->dev_list_node); | 672 | list_del(&child->dev_list_node); |
671 | out_free: | 673 | out_free: |
672 | sas_port_delete(phy->port); | 674 | sas_port_delete(phy->port); |
@@ -1444,12 +1446,8 @@ int sas_discover_root_expander(struct domain_device *dev) | |||
1444 | return res; | 1446 | return res; |
1445 | 1447 | ||
1446 | out_err2: | 1448 | out_err2: |
1447 | sas_rphy_delete(dev->rphy); | 1449 | sas_rphy_remove(dev->rphy); |
1448 | dev->rphy = NULL; | ||
1449 | return res; | ||
1450 | out_err: | 1450 | out_err: |
1451 | sas_rphy_free(dev->rphy); | ||
1452 | dev->rphy = NULL; | ||
1453 | return res; | 1451 | return res; |
1454 | } | 1452 | } |
1455 | 1453 | ||