lib/ftl:fix scanbuild error in ftl_anm.c
Here we should consider about that ctrlr may be NULL, so add assert here. Change-Id: If4c8b2c6382ae6fdad541168d2e2b856fb5b8182 Signed-off-by: yidong0635 <dongx.yi@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454546 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
84429e7bbb
commit
1c8efbdd51
@ -402,7 +402,7 @@ ftl_anm_unregister_device(struct spdk_ftl_dev *dev)
|
||||
|
||||
pthread_mutex_lock(&g_anm.lock);
|
||||
ctrlr = ftl_anm_find_ctrlr(&g_anm, dev->ctrlr);
|
||||
|
||||
assert(ctrlr != NULL);
|
||||
pthread_mutex_lock(&ctrlr->lock);
|
||||
|
||||
LIST_FOREACH_SAFE(poller, &ctrlr->pollers, list_entry, temp_poller) {
|
||||
|
Loading…
Reference in New Issue
Block a user