[PATCH 02/13] media: i2c: imx214: Remove unneeded goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: André Apitzsch <git@xxxxxxxxxxx>

Simplify the imx214_start_streaming() by removing unneeded goto
statements, and the corresponding error label.

Signed-off-by: André Apitzsch <git@xxxxxxxxxxx>
---
 drivers/media/i2c/imx214.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index 58f3c3f67e0d..283d4783c22e 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -776,7 +776,7 @@ static int imx214_start_streaming(struct imx214 *imx214)
 	ret = imx214_write_table(imx214, mode_table_common);
 	if (ret < 0) {
 		dev_err(imx214->dev, "could not sent common table %d\n", ret);
-		goto error;
+		return ret;
 	}
 
 	mode = v4l2_find_nearest_size(imx214_modes,
@@ -785,22 +785,17 @@ static int imx214_start_streaming(struct imx214 *imx214)
 	ret = imx214_write_table(imx214, mode->reg_table);
 	if (ret < 0) {
 		dev_err(imx214->dev, "could not sent mode table %d\n", ret);
-		goto error;
+		return ret;
 	}
 	ret = __v4l2_ctrl_handler_setup(&imx214->ctrls);
 	if (ret < 0) {
 		dev_err(imx214->dev, "could not sync v4l2 controls\n");
-		goto error;
+		return ret;
 	}
 	ret = regmap_write(imx214->regmap, IMX214_REG_MODE_SELECT, IMX214_MODE_STREAMING);
-	if (ret < 0) {
+	if (ret < 0)
 		dev_err(imx214->dev, "could not sent start table %d\n", ret);
-		goto error;
-	}
-
-	return 0;
 
-error:
 	return ret;
 }
 

-- 
2.46.0






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux