Commit 8fe66bad authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

scsi: libsas: Fix an error code in sas_ata_add_dev()

This code accidentally returns success instead of -ENOMEM.

Fixes: 7cc7646b ("scsi: libsas: Factor out sas_ata_add_dev()")
Link: https://lore.kernel.org/r/Y7asLxzVwQ56G+ya@kiliSigned-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 58edf8b9
......@@ -716,7 +716,7 @@ int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
rphy = sas_end_device_alloc(phy->port);
if (!rphy)
return ret;
return -ENOMEM;
rphy->identify.phy_identifier = phy_id;
child->rphy = rphy;
......
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