summaryrefslogtreecommitdiff
path: root/src/v4l2subdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2subdev.c')
-rw-r--r--src/v4l2subdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/v4l2subdev.c b/src/v4l2subdev.c
index 2d45d7f..efc6708 100644
--- a/src/v4l2subdev.c
+++ b/src/v4l2subdev.c
@@ -45,10 +45,11 @@ int v4l2_subdev_open(struct media_entity *entity)
entity->fd = open(entity->devname, O_RDWR);
if (entity->fd == -1) {
+ int ret = -errno;
media_dbg(entity->media,
"%s: Failed to open subdev device node %s\n", __func__,
entity->devname);
- return -errno;
+ return ret;
}
return 0;