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

From: Qinglang Miao
Date: Mon Sep 21 2020 - 09:11:43 EST


Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
---
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