mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
soundwire: cadence: Simplify error paths in cdns_xfer_msg()
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>
This commit is contained in:
parent
7f6bad4dfd
commit
bafb1eacfb
1 changed files with 4 additions and 7 deletions
|
@ -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 exit;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!(msg->len % CDNS_MCP_CMD_LEN))
|
||||
goto exit;
|
||||
return SDW_CMD_OK;
|
||||
|
||||
ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN,
|
||||
msg->len % CDNS_MCP_CMD_LEN, false);
|
||||
|
||||
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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue