Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dan Carpenter and committed by
Martin K. Petersen
8fe66bad 58edf8b9

+1 -1
+1 -1
drivers/scsi/libsas/sas_ata.c
··· 716 716 717 717 rphy = sas_end_device_alloc(phy->port); 718 718 if (!rphy) 719 - return ret; 719 + return -ENOMEM; 720 720 721 721 rphy->identify.phy_identifier = phy_id; 722 722 child->rphy = rphy;