Commit 3d1a99e2 authored by Liu Shixin's avatar Liu Shixin Committed by Martin K. Petersen

scsi: libsas: Simplify the return expression of sas_discover_* functions

Simplify the return expression.

Link: https://lore.kernel.org/r/20200921134558.3478922-1-liushixin2@huawei.comReviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 713a8468
...@@ -726,19 +726,13 @@ void sas_resume_sata(struct asd_sas_port *port) ...@@ -726,19 +726,13 @@ void sas_resume_sata(struct asd_sas_port *port)
*/ */
int sas_discover_sata(struct domain_device *dev) int sas_discover_sata(struct domain_device *dev)
{ {
int res;
if (dev->dev_type == SAS_SATA_PM) if (dev->dev_type == SAS_SATA_PM)
return -ENODEV; return -ENODEV;
dev->sata_dev.class = sas_get_ata_command_set(dev); dev->sata_dev.class = sas_get_ata_command_set(dev);
sas_fill_in_rphy(dev, dev->rphy); sas_fill_in_rphy(dev, dev->rphy);
res = sas_notify_lldd_dev_found(dev); return sas_notify_lldd_dev_found(dev);
if (res)
return res;
return 0;
} }
static void async_sas_ata_eh(void *data, async_cookie_t cookie) static void async_sas_ata_eh(void *data, async_cookie_t cookie)
......
...@@ -278,13 +278,7 @@ static void sas_resume_devices(struct work_struct *work) ...@@ -278,13 +278,7 @@ static void sas_resume_devices(struct work_struct *work)
*/ */
int sas_discover_end_dev(struct domain_device *dev) int sas_discover_end_dev(struct domain_device *dev)
{ {
int res; return sas_notify_lldd_dev_found(dev);
res = sas_notify_lldd_dev_found(dev);
if (res)
return res;
return 0;
} }
/* ---------- Device registration and unregistration ---------- */ /* ---------- Device registration and unregistration ---------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment