* [PATCH -next] rsxx: simplify the return expression of rsxx_save_config()
@ 2020-09-21 13:10 Qinglang Miao
0 siblings, 0 replies; only message in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
To: Joshua Morris, Philip Kelleher, Jens Axboe
Cc: linux-block, linux-kernel, Qinglang Miao
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 --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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-21 13:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] rsxx: simplify the return expression of rsxx_save_config() Qinglang Miao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).