commit | 759aa90a1ebea4caea2a07a9f55a546706b40add | [log] [tgz] |
---|---|---|
author | Kogara Naveen Kumar <quic_nkogara@quicinc.com> | Fri Jun 24 17:50:29 2022 +0530 |
committer | Kogara Naveen Kumar <quic_nkogara@quicinc.com> | Fri Jun 24 17:53:57 2022 +0530 |
tree | 09871c1c6489f7b5bf02e56dd0f01e6b9175acff | |
parent | d7296d4795f0d26b989e64b98151150fd84bd35a [diff] |
audio-hal: fix for kw issue Changes to fix file descriptor close. Change-Id: Icff466d1f758190b9aa77b72d6896a664df3ebce
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c index 418707b..571b4f3 100644 --- a/hal/audio_extn/spkr_protection.c +++ b/hal/audio_extn/spkr_protection.c
@@ -1877,7 +1877,7 @@ if (ioctl(cal_fd, AUDIO_SET_CALIBRATION, &cal_data)) ALOGE("%s: failed to set TH VI V_VALI_CFG, errno = %d", __func__, errno); - if (cal_fd > 0) + if (cal_fd >= 0) close(cal_fd); done: return ret;