Commit 24564bb8 authored by Aleksandr Mishin's avatar Aleksandr Mishin Committed by Qi Xi
Browse files

ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()

stable inclusion
from stable-v4.19.323
commit 90d62b53d8281851d8cff06f3a663dd169c5536a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBBN6V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=90d62b53d8281851d8cff06f3a663dd169c5536a



--------------------------------

[ Upstream commit 07442c46abad1d50ac82af5e0f9c5de2732c4592 ]

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: e13452ac ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver")
Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarAleksandr Mishin <amishin@t-argos.ru>
Reviewed-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240730225339.13165-1-amishin@t-argos.ru


[ rjw: Subject edit ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarQi Xi <xiqi2@huawei.com>
parent 64cde6fe
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -376,10 +376,8 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev)
	struct tps68470_pmic_opregion *opregion;
	acpi_status status;

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

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