libion: Add missing error checks for input parameters to APIs.

The errors were caught by ion-unit-tests. Make sure we fix them before
we start running the tests in automation etc.

Bug: 133508579
Test: ion-unit-tests

Change-Id: I7ebecfa037767481ee7f2b30e2923c84ebc352bf
Signed-off-by: Sandeep Patil <sspatil@google.com>
1 file changed