diff mbox

[7/9] media: atomisp-gc0310: return errors at gc0310_init()

Message ID 83c5604e70d99b4504169fdb7e6bbd0eaeaaab85.1523896259.git.mchehab@s-opensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab April 16, 2018, 4:37 p.m. UTC
If something wrong gets there, return the error.

Get rid of this warning:

  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c: In function 'gc0310_init':
  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c:713:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    int ret;
        ^~~

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index 512fa87fa11b..3b38cbccf294 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -727,7 +727,7 @@  static int gc0310_init(struct v4l2_subdev *sd)
 	mutex_unlock(&dev->input_lock);
 
 	pr_info("%s E\n", __func__);
-	return 0;
+	return ret;
 }
 
 static int power_ctrl(struct v4l2_subdev *sd, bool flag)