Add missing checks for error coditions in linux.io.Linux JNI

Test: make & flash
Bug: 66907045
Bug: 66910813
Change-Id: Iaca77f5df448ea3839e89f275e91c0a60fdd0601
(cherry picked from commit 93a973589d69b7e4a725c058761b79a5d6600796)
2 files changed