[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240705110234.14969-1-amishin@t-argos.ru>
Date: Fri, 5 Jul 2024 14:02:34 +0300
From: Aleksandr Mishin <amishin@...rgos.ru>
To: Martyn Welch <martyn.welch@...anuc.com>
CC: Aleksandr Mishin <amishin@...rgos.ru>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Soumya Negi <soumya.negi97@...il.com>, Alexon
Oliveira <alexondunkan@...il.com>, Piro Yang <piroyangg@...il.com>, Andi
Shyti <andi.shyti@...ux.intel.com>, "Ricardo B. Marliere"
<ricardo@...liere.net>, Jinjie Ruan <ruanjinjie@...wei.com>,
<linux-kernel@...r.kernel.org>, <linux-staging@...ts.linux.dev>,
<lvc-project@...uxtesting.org>
Subject: [PATCH] staging: vme: Remove unneeded check in vme_lm_request()
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@...rgos.ru>
---
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
Powered by blists - more mailing lists