Commit f779ad09 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Vinod Koul

soundwire: (cosmetic) remove multiple superfluous "else" statements

No need for an "else" after a "return" statement. Remove multiple such
occurrences in bus.c.
Signed-off-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200508003046.23162-2-guennadi.liakhovetski@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 4f1738f4
...@@ -284,9 +284,10 @@ int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave, ...@@ -284,9 +284,10 @@ int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave,
msg->flags = flags; msg->flags = flags;
msg->buf = buf; msg->buf = buf;
if (addr < SDW_REG_NO_PAGE) { /* no paging area */ if (addr < SDW_REG_NO_PAGE) /* no paging area */
return 0; return 0;
} else if (addr >= SDW_REG_MAX) { /* illegal addr */
if (addr >= SDW_REG_MAX) { /* illegal addr */
pr_err("SDW: Invalid address %x passed\n", addr); pr_err("SDW: Invalid address %x passed\n", addr);
return -EINVAL; return -EINVAL;
} }
...@@ -306,7 +307,9 @@ int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave, ...@@ -306,7 +307,9 @@ int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave,
if (!slave) { if (!slave) {
pr_err("SDW: No slave for paging addr\n"); pr_err("SDW: No slave for paging addr\n");
return -EINVAL; return -EINVAL;
} else if (!slave->prop.paging_support) { }
if (!slave->prop.paging_support) {
dev_err(&slave->dev, dev_err(&slave->dev,
"address %x needs paging but no support\n", addr); "address %x needs paging but no support\n", addr);
return -EINVAL; return -EINVAL;
...@@ -375,8 +378,8 @@ sdw_bread_no_pm(struct sdw_bus *bus, u16 dev_num, u32 addr) ...@@ -375,8 +378,8 @@ sdw_bread_no_pm(struct sdw_bus *bus, u16 dev_num, u32 addr)
ret = sdw_transfer(bus, &msg); ret = sdw_transfer(bus, &msg);
if (ret < 0) if (ret < 0)
return ret; return ret;
else
return buf; return buf;
} }
static int static int
...@@ -471,8 +474,8 @@ int sdw_read(struct sdw_slave *slave, u32 addr) ...@@ -471,8 +474,8 @@ int sdw_read(struct sdw_slave *slave, u32 addr)
ret = sdw_nread(slave, addr, 1, &buf); ret = sdw_nread(slave, addr, 1, &buf);
if (ret < 0) if (ret < 0)
return ret; return ret;
else
return buf; return buf;
} }
EXPORT_SYMBOL(sdw_read); EXPORT_SYMBOL(sdw_read);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment