[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <8e425618f4042a8ab8366be4d34026972e77bd40.1622911768.git.christophe.jaillet@wanadoo.fr>
Date: Sat, 5 Jun 2021 18:53:47 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: arnd@...db.de, gregkh@...uxfoundation.org,
mihai.carabas@...cle.com, akpm@...ux-foundation.org,
andriy.shevchenko@...ux.intel.com, yuehaibing@...wei.com
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH] misc/pvpanic: Remove some dead-code
'pvpanic_remove()' is referenced only by a 'devm_add_action_or_reset()'
call in 'devm_pvpanic_probe()'. So, we know that its parameter is non-NULL.
Axe the unneeded check to save a few lines of code.
Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/misc/pvpanic/pvpanic.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/misc/pvpanic/pvpanic.c b/drivers/misc/pvpanic/pvpanic.c
index 82770a088d62..02b807c788c9 100644
--- a/drivers/misc/pvpanic/pvpanic.c
+++ b/drivers/misc/pvpanic/pvpanic.c
@@ -66,9 +66,6 @@ static void pvpanic_remove(void *param)
struct pvpanic_instance *pi_cur, *pi_next;
struct pvpanic_instance *pi = param;
- if (!pi)
- return;
-
spin_lock(&pvpanic_lock);
list_for_each_entry_safe(pi_cur, pi_next, &pvpanic_list, list) {
if (pi_cur == pi) {
--
2.30.2
Powered by blists - more mailing lists