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>] [day] [month] [year] [list]
Message-ID: <20200921131059.92987-1-miaoqinglang@huawei.com>
Date:   Mon, 21 Sep 2020 21:10:59 +0800
From:   Qinglang Miao <miaoqinglang@...wei.com>
To:     Joshua Morris <josh.h.morris@...ibm.com>,
        Philip Kelleher <pjk1939@...ux.ibm.com>,
        Jens Axboe <axboe@...nel.dk>
CC:     <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Qinglang Miao" <miaoqinglang@...wei.com>
Subject: [PATCH -next] rsxx: simplify the return expression of rsxx_save_config()

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
 drivers/block/rsxx/config.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/block/rsxx/config.c b/drivers/block/rsxx/config.c
index 11ed1d964..c6de88186 100644
--- a/drivers/block/rsxx/config.c
+++ b/drivers/block/rsxx/config.c
@@ -84,7 +84,6 @@ static void config_data_cpu_to_le(struct rsxx_card_cfg *cfg)
 static int rsxx_save_config(struct rsxx_cardinfo *card)
 {
 	struct rsxx_card_cfg cfg;
-	int st;
 
 	memcpy(&cfg, &card->config, sizeof(cfg));
 
@@ -107,11 +106,7 @@ static int rsxx_save_config(struct rsxx_cardinfo *card)
 	config_data_swab(&cfg);
 	config_hdr_cpu_to_be(&cfg.hdr);
 
-	st = rsxx_creg_write(card, CREG_ADD_CONFIG, sizeof(cfg), &cfg, 1);
-	if (st)
-		return st;
-
-	return 0;
+	return rsxx_creg_write(card, CREG_ADD_CONFIG, sizeof(cfg), &cfg, 1);
 }
 
 int rsxx_load_config(struct rsxx_cardinfo *card)
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ