scsi: libsas: Fix an error code in sas_ata_add_dev()
This code accidentally returns success instead of -ENOMEM. Fixes: 7cc7646b4b24 ("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:
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user