[libcamera-devel] [PATCH 4/4] vimc: fix close(-1)
Tomi Valkeinen
tomi.valkeinen at iki.fi
Wed Oct 7 11:22:39 CEST 2020
~IPAVimc() checks if fd != 0, but it should check if fd != -1.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>
---
src/ipa/vimc/vimc.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index ef25776..372a15f 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -61,7 +61,7 @@ IPAVimc::IPAVimc()
IPAVimc::~IPAVimc()
{
- if (fd_)
+ if (fd_ != -1)
::close(fd_);
}
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
More information about the libcamera-devel
mailing list