fingerprint: Fix ioctl() return value check

ioctl() returns 0 on success.

Change-Id: I0bbdad6689fc21378d7b0c039c09e7e6288c1dae
This commit is contained in:
LuK1337
2022-07-11 14:38:41 +02:00
parent e80c28314d
commit c6356e112c

View File

@@ -115,11 +115,11 @@ class BiometricsFingerprint : public IBiometricsFingerprint,
}
bool setDimlayerHbm(unsigned int value) {
return isUdfps() && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_DIMLAYER_HBM, &value);
return isUdfps() && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_DIMLAYER_HBM, &value) == 0;
}
bool setFpPress(unsigned int value) {
return isUdfps() && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_FP_PRESS, &value);
return isUdfps() && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_FP_PRESS, &value) == 0;
}
sp<IOplusBiometricsFingerprint> mOplusBiometricsFingerprint;