LCD_KCAL: Prevent out-of-range input values

Change-Id: Ia9a9de1ce285007b5445149716a935cbf708d17e