]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ata: libata-sata: Improve ata_sas_slave_configure()
authorDamien Le Moal <dlemoal@kernel.org>
Wed, 30 Aug 2023 07:59:04 +0000 (16:59 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 3 Oct 2023 00:39:50 +0000 (09:39 +0900)
Change ata_sas_slave_configure() to return the return value of
ata_scsi_dev_config() to ensure that any error from that function is
propagated to libsas.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Tested-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-sata.c

index a701e1538482f09eb5960a606edad01f34920401..83a9497e48e14b808b5318f43a30a64e03a484a9 100644 (file)
@@ -1182,8 +1182,8 @@ EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
 int ata_sas_slave_configure(struct scsi_device *sdev, struct ata_port *ap)
 {
        ata_scsi_sdev_config(sdev);
-       ata_scsi_dev_config(sdev, ap->link.device);
-       return 0;
+
+       return ata_scsi_dev_config(sdev, ap->link.device);
 }
 EXPORT_SYMBOL_GPL(ata_sas_slave_configure);