diff mbox series

[-next] rsxx: simplify the return expression of rsxx_save_config()

Message ID 20200921131059.92987-1-miaoqinglang@huawei.com
State New
Headers show
Series [-next] rsxx: simplify the return expression of rsxx_save_config() | expand

Commit Message

Qinglang Miao Sept. 21, 2020, 1:10 p.m. UTC
Simplify the return expression.

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

Patch

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)