Whamcloud - gitweb
LU-4698 target: check for NULL tgt before deref
In the case of and echo server during obdfilter-survey tests a target
can be missing from the obd_device.
Check for a valid pointer before dereferencing it, return error if
it's NULL.
Check for valid obt in class_exp2tgt otherwise return NULL target.
Add checks for all places that call class_exp2tgt for NULL return
value.
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I27a3020dc7ef9943fb600c3ddb6432f7f67f8b39
Reviewed-on: http://review.whamcloud.com/9936
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>