In vme_lm_request() list_for_each() pointer 'lm' is compared to NULL which is useless. Fix this issue by removing unneeded check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 42fb503122d8 ("Staging: vme: add VME Location Monitor management mechanism") Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx> --- drivers/staging/vme_user/vme.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c index 0cd370ab1008..223c4d607c88 100644 --- a/drivers/staging/vme_user/vme.c +++ b/drivers/staging/vme_user/vme.c @@ -1445,12 +1445,6 @@ struct vme_resource *vme_lm_request(struct vme_dev *vdev) /* Loop through LM resources */ list_for_each_entry(lm, &bridge->lm_resources, list) { - if (!lm) { - dev_err(bridge->parent, - "Registered NULL Location Monitor resource\n"); - continue; - } - /* Find an unlocked controller */ mutex_lock(&lm->mtx); if (lm->locked == 0) { -- 2.30.2