Message ID | X84nbdgv0a/ak2ef@mwanda (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: i2c: ov02a10: fix an uninitialized return | expand |
Hi Dan, On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote: > The "ret" variable isn't set on the no-op path where we are setting to > on/off and it's in the on or off state already. > > Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Thanks for the patch. This issue has been fixed by another patch here: <URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>
diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c index 391718136ade..cf40e207ea21 100644 --- a/drivers/media/i2c/ov02a10.c +++ b/drivers/media/i2c/ov02a10.c @@ -530,7 +530,7 @@ static int ov02a10_s_stream(struct v4l2_subdev *sd, int on) { struct ov02a10 *ov02a10 = to_ov02a10(sd); struct i2c_client *client = v4l2_get_subdevdata(&ov02a10->subdev); - int ret; + int ret = 0; mutex_lock(&ov02a10->mutex);
The "ret" variable isn't set on the no-op path where we are setting to on/off and it's in the on or off state already. Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/media/i2c/ov02a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)