mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI / PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()
@ 2024-07-05 11:34 Aleksandr Mishin
  2024-07-06 11:56 ` Sakari Ailus
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Aleksandr Mishin @ 2024-07-05 11:34 UTC (permalink / raw)
  To: Rajmohan Mani
  Cc: Aleksandr Mishin, Rafael J. Wysocki, Len Brown, Andy Shevchenko,
	Mika Westerberg, Sakari Ailus, linux-acpi, linux-kernel,
	lvc-project

In tps68470_pmic_opregion_probe() pointer 'dev' is compared to NULL which
is useless.

Fix this issue by removing unneeded check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: e13452ac3790 ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
---
 drivers/acpi/pmic/tps68470_pmic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/pmic/tps68470_pmic.c b/drivers/acpi/pmic/tps68470_pmic.c
index ebd03e472955..f8de8d0a528b 100644
--- a/drivers/acpi/pmic/tps68470_pmic.c
+++ b/drivers/acpi/pmic/tps68470_pmic.c
@@ -376,7 +376,7 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev)
 	struct tps68470_pmic_opregion *opregion;
 	acpi_status status;
 
-	if (!dev || !tps68470_regmap) {
+	if (!tps68470_regmap) {
 		dev_warn(dev, "dev or regmap is NULL\n");
 		return -EINVAL;
 	}
-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-31 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05 11:34 [PATCH] ACPI / PMIC: Remove unneeded check in tps68470_pmic_opregion_probe() Aleksandr Mishin
2024-07-06 11:56 ` Sakari Ailus
2024-07-06 13:47 ` Markus Elfring
2024-07-30 19:38 ` Andy Shevchenko
2024-07-30 22:53 ` [PATCH v2] " Aleksandr Mishin
2024-07-31  7:19   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®