Message ID | 20201204082037.1658297-1-arnd@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] media: i2c: fix an uninitialized error code | expand |
diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c index 391718136ade..8683ffd3287a 100644 --- a/drivers/media/i2c/ov02a10.c +++ b/drivers/media/i2c/ov02a10.c @@ -534,8 +534,10 @@ static int ov02a10_s_stream(struct v4l2_subdev *sd, int on) mutex_lock(&ov02a10->mutex); - if (ov02a10->streaming == on) + if (ov02a10->streaming == on) { + ret = 0; goto unlock_and_return; + } if (on) { ret = pm_runtime_get_sync(&client->dev);