* [PATCH] platform/x86: thinkpad_acpi: check the return value of devm_mutex_init()
@ 2025-03-05 10:31 Bartosz Golaszewski
2025-03-05 13:10 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-03-05 10:31 UTC (permalink / raw)
To: Henrique de Moraes Holschuh, Hans de Goede, Ilpo Järvinen
Cc: ibm-acpi-devel, platform-driver-x86, linux-kernel,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
devm_mutex_init() can fail so check its return value.
Fixes: 38b9ab80db31 ("platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe.")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/platform/x86/thinkpad_acpi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 6128ad820ea0..d8df1405edfa 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -11849,7 +11849,9 @@ static int __init tpacpi_pdriver_probe(struct platform_device *pdev)
{
int ret;
- devm_mutex_init(&pdev->dev, &tpacpi_inputdev_send_mutex);
+ ret = devm_mutex_init(&pdev->dev, &tpacpi_inputdev_send_mutex);
+ if (ret)
+ return ret;
tpacpi_inputdev = devm_input_allocate_device(&pdev->dev);
if (!tpacpi_inputdev)
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: check the return value of devm_mutex_init()
2025-03-05 10:31 [PATCH] platform/x86: thinkpad_acpi: check the return value of devm_mutex_init() Bartosz Golaszewski
@ 2025-03-05 13:10 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-03-05 13:10 UTC (permalink / raw)
To: Henrique de Moraes Holschuh, Hans de Goede, Bartosz Golaszewski
Cc: ibm-acpi-devel, platform-driver-x86, linux-kernel,
Bartosz Golaszewski
On Wed, 05 Mar 2025 11:31:46 +0100, Bartosz Golaszewski wrote:
> devm_mutex_init() can fail so check its return value.
>
>
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: thinkpad_acpi: check the return value of devm_mutex_init()
commit: e57eabe2fb044950e6ffdfe01803895043dec0b7
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-05 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 10:31 [PATCH] platform/x86: thinkpad_acpi: check the return value of devm_mutex_init() Bartosz Golaszewski
2025-03-05 13:10 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox