projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f6bad4
)
soundwire: cadence: Simplify error paths in cdns_xfer_msg()
author
Richard Fitzgerald
<rf@opensource.cirrus.com>
Sat, 17 Sep 2022 15:48:22 +0000
(16:48 +0100)
committer
Vinod Koul
<vkoul@kernel.org>
Tue, 20 Sep 2022 05:07:14 +0000
(10:37 +0530)
There's no need to goto an exit label to return from cdns_xfer_msg().
It doesn't do any cleanup, only a return statement.
Replace the gotos with returns.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link:
https://lore.kernel.org/r/20220917154822.690472-2-rf@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c
patch
|
blob
|
history
diff --git
a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 3543a923ee6b49787b4afe75eb6d090fe16f1efb..30b8c628fdbd201b806b745d1b332c7213fc32c7 100644
(file)
--- a/
drivers/soundwire/cadence_master.c
+++ b/
drivers/soundwire/cadence_master.c
@@
-709,17
+709,14
@@
cdns_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg)
ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN,
CDNS_MCP_CMD_LEN, false);
if (ret != SDW_CMD_OK)
-
goto exi
t;
+
return re
t;
}
if (!(msg->len % CDNS_MCP_CMD_LEN))
- goto exit;
-
- ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN,
- msg->len % CDNS_MCP_CMD_LEN, false);
+ return SDW_CMD_OK;
-exit:
-
return ret
;
+ return _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN,
+
msg->len % CDNS_MCP_CMD_LEN, false)
;
}
EXPORT_SYMBOL(cdns_xfer_msg);