From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Ricardo Ribalda <ribalda@chromium.org>,
"Rafael J. Wysocki (Intel)" <rafael@kernel.org>,
Daniel Scally <dan.scally@ideasonboard.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15.y] platform/x86: int3472: Fix uninitialised variable warning
Date: Mon, 9 Nov 2026 23:35:13 -0500 [thread overview]
Message-ID: <20261110043502.362465-1-sashal@kernel.org> (raw)
In-Reply-To: <20261107055737-failed-5.15-70e6384fe0f4@kernel.org>
From: Sakari Ailus <sakari.ailus@linux.intel.com>
[ Upstream commit 70e6384fe0f4cf9768944f81924f6c1478b0ce43 ]
Fix a compiler warning about an uninitialised err_msg variable by printing
the error where it is handled:
drivers/platform/x86/intel/int3472/discrete.c:440:24: warning: ‘err_msg’ may be used uninitialized [-Wmaybe-uninitialized]
440 | return dev_err_probe(int3472->dev, ret, err_msg);
Fixes: 5de691bffe57 ("platform/x86: Add intel_skl_int3472 driver")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
[ sashal: adapted error reporting to the older per-type GPIO mapping handlers ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/intel/int3472/discrete.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 31494f4247864..517103ea252e5 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -227,7 +227,6 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
struct int3472_discrete_device *int3472 = data;
struct acpi_resource_gpio *agpio;
union acpi_object *obj;
- const char *err_msg;
int ret;
u8 type;
@@ -256,27 +255,31 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "reset",
GPIO_ACTIVE_LOW);
if (ret)
- err_msg = "Failed to map reset pin to sensor\n";
+ dev_err_probe(int3472->dev, ret,
+ "Failed to map reset pin to sensor\n");
break;
case INT3472_GPIO_TYPE_POWERDOWN:
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "powerdown",
GPIO_ACTIVE_LOW);
if (ret)
- err_msg = "Failed to map powerdown pin to sensor\n";
+ dev_err_probe(int3472->dev, ret,
+ "Failed to map powerdown pin to sensor\n");
break;
case INT3472_GPIO_TYPE_CLK_ENABLE:
case INT3472_GPIO_TYPE_PRIVACY_LED:
ret = skl_int3472_map_gpio_to_clk(int3472, agpio, type);
if (ret)
- err_msg = "Failed to map GPIO to clock\n";
+ dev_err_probe(int3472->dev, ret,
+ "Failed to map GPIO to clock\n");
break;
case INT3472_GPIO_TYPE_POWER_ENABLE:
ret = skl_int3472_register_regulator(int3472, agpio);
if (ret)
- err_msg = "Failed to map regulator to sensor\n";
+ dev_err_probe(int3472->dev, ret,
+ "Failed to map regulator to sensor\n");
break;
default:
@@ -290,9 +293,6 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
int3472->ngpios++;
ACPI_FREE(obj);
- if (ret < 0)
- return dev_err_probe(int3472->dev, ret, err_msg);
-
return ret;
}
--
2.53.0
prev parent reply other threads:[~2026-11-10 4:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 10:57 FAILED: patch "[PATCH] platform/x86: int3472: Fix uninitialised variable warning" failed to apply to 5.15-stable tree Sasha Levin
2026-11-10 4:35 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110043502.362465-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=rafael@kernel.org \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox