hal: return error if write fails

An error code is returned if there is any failure in
out_write() API in the case of passthrough streams.
This change is needed to handle the error scenarios
properly in the application.

Change-Id: I760cb9342291490f0bf1fb61e196d57558c09fb5
2 files changed