Skip to content

Commit 07442c4

Browse files
Aleksandr Mishinrafaeljw
authored andcommitted
ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()
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: e13452a ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver") Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Aleksandr Mishin <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8400291 commit 07442c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/acpi/pmic/tps68470_pmic.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,8 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev)
376376
struct tps68470_pmic_opregion *opregion;
377377
acpi_status status;
378378

379-
if (!dev || !tps68470_regmap) {
380-
dev_warn(dev, "dev or regmap is NULL\n");
381-
return -EINVAL;
382-
}
379+
if (!tps68470_regmap)
380+
return dev_err_probe(dev, -EINVAL, "regmap is missing\n");
383381

384382
if (!handle) {
385383
dev_warn(dev, "acpi handle is NULL\n");

0 commit comments

Comments
 (0)