media: smiapp: Put the device again if starting streaming fails
If there was an error in starting streaming, put the runtime usage count of the device. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
96e3a6b92f
commit
22ad4e0558
|
@ -1565,8 +1565,11 @@ static int smiapp_set_stream(struct v4l2_subdev *subdev, int enable)
|
|||
sensor->streaming = true;
|
||||
|
||||
rval = smiapp_start_streaming(sensor);
|
||||
if (rval < 0)
|
||||
if (rval < 0) {
|
||||
sensor->streaming = false;
|
||||
pm_runtime_mark_last_busy(&client->dev);
|
||||
pm_runtime_put_autosuspend(&client->dev);
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue