When sas_port is NULL, then return SAS_PHY_DOWN.
In addition, when the sas_dev is gone then explicitly return
SAS_PHY_DOWN.
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
*/
if (device->dev_type != SAS_SATA_DEV)
task->task_done(task);
- return 0;
+ return SAS_PHY_DOWN;
}
if (DEV_IS_GONE(sas_dev)) {
dev_info(dev, "task prep: device %016llx not ready\n",
SAS_ADDR(device->sas_addr));
- rc = SAS_PHY_DOWN;
- return rc;
+ return SAS_PHY_DOWN;
}
port = to_hisi_sas_port(sas_port);