diff mbox series

[v2,2/2] soundwire: intel: (cosmetic) remove multiple superfluous "else" statements

Message ID 20200508003046.23162-3-guennadi.liakhovetski@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series soundwire: remove multiple superfluous "else" statements | expand

Commit Message

Guennadi Liakhovetski May 8, 2020, 12:30 a.m. UTC
No need for an "else" after a "return" statement. Remove multiple such
occurrences in Intel-specific code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 drivers/soundwire/cadence_master.c | 8 ++++++--
 drivers/soundwire/intel_init.c     | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index ecd357d1..9ea8753 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -407,7 +407,9 @@  void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root)
 	if (nack) {
 		dev_err_ratelimited(cdns->dev, "Msg NACKed for Slave %d\n", msg->dev_num);
 		return SDW_CMD_FAIL;
-	} else if (no_ack) {
+	}
+
+	if (no_ack) {
 		dev_dbg_ratelimited(cdns->dev, "Msg ignored for Slave %d\n", msg->dev_num);
 		return SDW_CMD_IGNORED;
 	}
@@ -520,7 +522,9 @@  void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root)
 		dev_err_ratelimited(cdns->dev,
 				    "SCP_addrpage NACKed for Slave %d\n", msg->dev_num);
 		return SDW_CMD_FAIL;
-	} else if (no_ack) {
+	}
+
+	if (no_ack) {
 		dev_dbg_ratelimited(cdns->dev,
 				    "SCP_addrpage ignored for Slave %d\n", msg->dev_num);
 		return SDW_CMD_IGNORED;
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
index 4b76940..d5d4279 100644
--- a/drivers/soundwire/intel_init.c
+++ b/drivers/soundwire/intel_init.c
@@ -86,7 +86,9 @@  static int sdw_intel_cleanup_pdev(struct sdw_intel_ctx *ctx)
 		dev_err(&adev->dev, "Link count %d exceeds max %d\n",
 			count, SDW_MAX_LINKS);
 		return NULL;
-	} else if (!count) {
+	}
+
+	if (!count) {
 		dev_warn(&adev->dev, "No SoundWire links detected\n");
 		return NULL;
 	}