Merge "hal: add checks for calibration buffer allocation failures"