Check for calibration type is within a valid range
to avoid out of bound read in checking a bit in a bitmask.
Change-Id: Id8b3af47cd8077f460ac60a33d959ccbb6a21692
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
(cherry picked from commit 544f150134722543d0f8c834164293de5b25e417)
Signed-off-by: Manish Kumar <quic_kmanis@quicinc.com>