diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-19 23:11:34 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-19 23:11:34 +0200 |
commit | 5154f4d6f89e9853b768fc0ec470fa4dff5f890a (patch) | |
tree | 700d856bedf3d8cc088b5fc9b869f9a74e77d2cc /subdev.c | |
parent | abbd1a3b585c685426196f066ad7fd417ed730a0 (diff) |
Return -errno in functions returning a negative error code
errno is a positive value, fix functions that return errno when they are
expected to return a negative error code.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'subdev.c')
-rw-r--r-- | subdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,7 +41,7 @@ static int v4l2_subdev_open(struct media_entity *entity) if (entity->fd == -1) { printf("%s: Failed to open subdev device node %s\n", __func__, entity->devname); - return errno; + return -errno; } return 0; @@ -64,7 +64,7 @@ int v4l2_subdev_get_format(struct media_entity *entity, ret = ioctl(entity->fd, VIDIOC_SUBDEV_G_FMT, &fmt); if (ret < 0) - return errno; + return -errno; *format = fmt.format; return 0; @@ -88,7 +88,7 @@ int v4l2_subdev_set_format(struct media_entity *entity, ret = ioctl(entity->fd, VIDIOC_SUBDEV_S_FMT, &fmt); if (ret < 0) - return errno; + return -errno; *format = fmt.format; return 0; |