mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 05:39:42 -04:00
scsi: libsas: Fix an error code in sas_ata_add_dev()
This code accidentally returns success instead of -ENOMEM.
Fixes: 7cc7646b4b ("scsi: libsas: Factor out sas_ata_add_dev()")
Link: https://lore.kernel.org/r/Y7asLxzVwQ56G+ya@kili
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
58edf8b928
commit
8fe66badf0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user