lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Sep 2022 06:29:29 +0000
From:   cgel.zte@...il.com
To:     damien.lemoal@...nsource.wdc.com
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] ata: libata-eh: Remove the unneeded result variable

From: ye xingchen <ye.xingchen@....com.cn>

Return the value ata_port_abort() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 drivers/ata/libata-eh.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 7c128c89b454..7dbca2a2f9ee 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -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);
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ