klockwork: Fix NULL pointer deference

The following report from klockwork shows we have situation of NULL
pointer deference.

Pointer 'wilco_ec' returned from call to function 'new_wilco_ec' at line 100
may be NULL and will be dereferenced at line 104.
Pointer 'hostsw_own_reg' returned from call to function 'gpio_hostsw_reg' at
line 119 may be NULL and will be dereferenced at line 121.
Pointer 'get_active_fw_id()' returned from call to function 'get_active_fw_id'
at line 141 may be NULL and will be dereferenced at line 141.
Pointer 'get_ro_fw_id()' returned from call to function 'get_ro_fw_id' at line
141 may be NULL and will be dereferenced at line 141.

Change-Id: Ib5400a0ab43a56065893b4bd6a7979246c29c698
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1551761
Reviewed-by: Julius Werner <jwerner@chromium.org>
3 files changed