Change Assert to Check and return NULL

Security wise, we now end up relying on gbm_bo_import failing.
gbm does some basic validation based on lseek and the provided format.
For robustness, return NULL instead of crashing the system.

BUG=979736

Change-Id: Ib25a770a3a986a3079fe8db183ea78ac5f777602
Reviewed-on: https://chromium-review.googlesource.com/1693301
Tested-by: Mark Yacoub <markyacoub@google.com>
Commit-Ready: Mark Yacoub <markyacoub@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Mark Yacoub <markyacoub@google.com>
1 file changed