Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b612a976 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8ff636c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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)