diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-01 13:24:14 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-04-16 23:40:56 +0200 |
commit | 9d1912c95f99339fe030d39dcae1928bb402b64b (patch) | |
tree | d243a2ec1640dd7d53a8e329e8087d889e542ee2 | |
parent | 558ba6935cc99188018bff9c43a701a291b1aafc (diff) |
subdev: Avoid double-close in v4l2_subdev_close()
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | isp/subdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/isp/subdev.c b/isp/subdev.c index b4894a2..9b36234 100644 --- a/isp/subdev.c +++ b/isp/subdev.c @@ -75,7 +75,11 @@ int v4l2_subdev_open(struct media_entity *entity) void v4l2_subdev_close(struct media_entity *entity) { + if (entity->fd == -1) + return; + close(entity->fd); + entity->fd = -1; } int v4l2_subdev_get_format(struct media_entity *entity, |