Merge "soc: qcom: Update conditional logic for validating read and write index"