Commit 22ad4e05 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 96e3a6b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
}