diff mbox

[05/22] si2168: simplify si2168_cmd_execute() error path

Message ID 1417901696-5517-5-git-send-email-crope@iki.fi (mailing list archive)
State New, archived
Headers show

Commit Message

Antti Palosaari Dec. 6, 2014, 9:34 p.m. UTC
Remove if () from firmware command error path as there should not be
any error prone conditional logic there. Use goto labels instead.

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/si2168.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index db06bb7..2df3a27 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -66,15 +66,11 @@  static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd)
 		}
 	}
 
-	ret = 0;
+	mutex_unlock(&dev->i2c_mutex);
+	return 0;
 
 err_mutex_unlock:
 	mutex_unlock(&dev->i2c_mutex);
-	if (ret)
-		goto err;
-
-	return 0;
-err:
 	dev_dbg(&client->dev, "failed=%d\n", ret);
 	return ret;
 }