diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-03-11 19:32:05 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 14:57:00 +0100 |
commit | b612a9762b20be3c30a16625adb292e9f1ff25a6 (patch) | |
tree | 58d7bbdc150b0727e50a67b0dbe1ca88dcf80a64 /drivers | |
parent | b8ff636cd7d72334951a7fa1dfe9f21ba4d2107b (diff) |
staging: atomisp: clean up return logic, remove redunant code
There is no need to check if ret is non-zero, remove this
redundant check and just return the error status from the call
to mt9m114_write_reg_array.
Detected by CoverityScan, CID#1416577 ("Identical code for
different branches")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/mt9m114.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/i2c/mt9m114.c b/drivers/staging/media/atomisp/i2c/mt9m114.c index 1b79cdb27ce6..f9a00228765f 100644 --- a/drivers/staging/media/atomisp/i2c/mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/mt9m114.c @@ -444,12 +444,8 @@ static int mt9m114_set_suspend(struct v4l2_subdev *sd) static int mt9m114_init_common(struct v4l2_subdev *sd) { struct i2c_client *client = v4l2_get_subdevdata(sd); - int ret; - ret = mt9m114_write_reg_array(client, mt9m114_common, PRE_POLLING); - if (ret) - return ret; - return ret; + return mt9m114_write_reg_array(client, mt9m114_common, PRE_POLLING); } static int power_ctrl(struct v4l2_subdev *sd, bool flag) |