sdm: Handle error on gralloc device open and close

Handle the error returned by gralloc open and gralloc close in Init()
and Deinit() functions of HWCBufferAllocator to avoid NULL pointer
dereferencing.

Change-Id: I56dcb0d35747d98eabb1ce9408b98e5b55aa3417
CRs-Fixed: 2066748
3 files changed