Merge "hal: handle null primary output scenario"