[PATCH 2/6] platform/x86: msi-wmi-platform: fix: Remove unused err

"Derek J. Clark" <[email protected]> Mon, 3 Aug 2026 15:16:10 -0700
Newsgroups org.kernel.vger.linux-hwmon,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.platform-driver-x86
Message-ID <[email protected]>
msi_wmi_platform_profile_setup() declares int err and leaves it
unintitialized, then returns PTR_ERR_OR_ZERO. Remove the unused
variable.

Signed-off-by: Derek J. Clark <[email protected]>
---
 drivers/platform/x86/msi-wmi-platform.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/platform/x86/msi-wmi-platform.c b/drivers/platform/x86/msi-wmi-platform.c
index 33acd448f674..2439b4f0001b 100644
--- a/drivers/platform/x86/msi-wmi-platform.c
+++ b/drivers/platform/x86/msi-wmi-platform.c
@@ -1422,16 +1422,12 @@ static int msi_wmi_platform_init(struct msi_wmi_platform_data *data)
 
 static int msi_wmi_platform_profile_setup(struct msi_wmi_platform_data *data)
 {
-	int err;
-
 	if (!data->quirks->shift_mode)
 		return 0;
 
 	data->ppdev = devm_platform_profile_register(
 		&data->wdev->dev, "msi-wmi-platform", data,
 		&msi_wmi_platform_profile_ops);
-	if (err)
-		return err;
 
 	return PTR_ERR_OR_ZERO(data->ppdev);
 }
-- 
2.55.0