ata: libata-eh: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Tue, 20 Sep 2022 06:29:29 +0000 (06:29 +0000)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 21 Sep 2022 02:17:05 +0000 (11:17 +0900)
Return the value ata_port_abort() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/libata-eh.c

index ef4508d72c023ee6ae8d97935a27f6d0e2275a04..c7827ad6360f0a3477adfdf925afa349edd61d71 100644 (file)
@@ -1086,14 +1086,11 @@ static void __ata_port_freeze(struct ata_port *ap)
  */
 int ata_port_freeze(struct ata_port *ap)
 {
-       int nr_aborted;
-
        WARN_ON(!ap->ops->error_handler);
 
        __ata_port_freeze(ap);
-       nr_aborted = ata_port_abort(ap);
 
-       return nr_aborted;
+       return ata_port_abort(ap);
 }
 EXPORT_SYMBOL_GPL(ata_port_freeze);