@@ -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)
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(-)