All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL
  2026-07-13 15:14 [PATCH v3 1/3] platform/x86: asus-wireless: " Jiale Yao
@ 2026-07-13 15:14 ` Jiale Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Jiale Yao @ 2026-07-13 15:14 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Jiale Yao, Herton Ronaldo Krzesinski, Hans de Goede,
	Ilpo Järvinen, linux-kernel

Add a requisite ACPI_COMPANION() check against NULL to the
topstar-laptop driver, aligning with the fix applied to
asus-wireless driver.

Assisted-by: claude:deepseek-v4-pro
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
 drivers/platform/x86/topstar-laptop.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index e09d7f8ce45f..f6fafa345f93 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -291,6 +291,9 @@ static int topstar_acpi_probe(struct platform_device *pdev)
 	struct topstar_laptop *topstar;
 	int err;
 
+	if (!device)
+		return -ENODEV;
+
 	dmi_check_system(topstar_dmi_ids);
 
 	topstar = kzalloc_obj(struct topstar_laptop);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL
@ 2026-10-17  6:43 Jiale Yao
  2026-10-17  7:42 ` jiale yao
  2026-10-19  6:09 ` [PATCH " Ilpo Järvinen
  0 siblings, 2 replies; 4+ messages in thread
From: Jiale Yao @ 2026-10-17  6:43 UTC (permalink / raw)
  To: Herton Ronaldo Krzesinski, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel
  Cc: Jiale Yao

Add a requisite ACPI_COMPANION() check against NULL to the
topstar-laptop driver, aligning with the fix applied to
asus-wireless driver.

Assisted-by: claude:deepseek-v4-pro
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
 drivers/platform/x86/topstar-laptop.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index e09d7f8ce45f..f6fafa345f93 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -291,6 +291,9 @@ static int topstar_acpi_probe(struct platform_device *pdev)
 	struct topstar_laptop *topstar;
 	int err;
 
+	if (!device)
+		return -ENODEV;
+
 	dmi_check_system(topstar_dmi_ids);
 
 	topstar = kzalloc_obj(struct topstar_laptop);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re:[PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL
  2026-10-17  6:43 [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL Jiale Yao
@ 2026-10-17  7:42 ` jiale yao
  2026-10-19  6:09 ` [PATCH " Ilpo Järvinen
  1 sibling, 0 replies; 4+ messages in thread
From: jiale yao @ 2026-10-17  7:42 UTC (permalink / raw)
  To: Herton Ronaldo Krzesinski, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel

At 2026-10-17 14:43:50, "Jiale Yao" <yaojiale02@163.com> wrote:
>Add a requisite ACPI_COMPANION() check against NULL to the
>topstar-laptop driver, aligning with the fix applied to
>asus-wireless driver.
>

Fixes: 3471415c8186 ("platform/x86: topstar-laptop: Convert ACPI driver to a platform one")

>Assisted-by: claude:deepseek-v4-pro
>Signed-off-by: Jiale Yao <yaojiale02@163.com>
>---
> drivers/platform/x86/topstar-laptop.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
>index e09d7f8ce45f..f6fafa345f93 100644
>--- a/drivers/platform/x86/topstar-laptop.c
>+++ b/drivers/platform/x86/topstar-laptop.c
>@@ -291,6 +291,9 @@ static int topstar_acpi_probe(struct platform_device *pdev)
> 	struct topstar_laptop *topstar;
> 	int err;
> 
>+	if (!device)
>+		return -ENODEV;
>+
> 	dmi_check_system(topstar_dmi_ids);
> 
> 	topstar = kzalloc_obj(struct topstar_laptop);
>-- 
>2.34.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL
  2026-10-17  6:43 [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL Jiale Yao
  2026-10-17  7:42 ` jiale yao
@ 2026-10-19  6:09 ` Ilpo Järvinen
  1 sibling, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-10-19  6:09 UTC (permalink / raw)
  To: Jiale Yao
  Cc: Herton Ronaldo Krzesinski, Hans de Goede, platform-driver-x86,
	LKML

On Sat, 17 Oct 2026, Jiale Yao wrote:

> Add a requisite ACPI_COMPANION() check against NULL to the
> topstar-laptop driver, aligning with the fix applied to
> asus-wireless driver.
> 
> Assisted-by: claude:deepseek-v4-pro
> Signed-off-by: Jiale Yao <yaojiale02@163.com>
> ---
>  drivers/platform/x86/topstar-laptop.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
> index e09d7f8ce45f..f6fafa345f93 100644
> --- a/drivers/platform/x86/topstar-laptop.c
> +++ b/drivers/platform/x86/topstar-laptop.c
> @@ -291,6 +291,9 @@ static int topstar_acpi_probe(struct platform_device *pdev)
>  	struct topstar_laptop *topstar;
>  	int err;
>  
> +	if (!device)

Call and it's error handling should kept together.

> +		return -ENODEV;
> +
>  	dmi_check_system(topstar_dmi_ids);
>  
>  	topstar = kzalloc_obj(struct topstar_laptop);
> 

-- 
 i.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-17  6:43 [PATCH v3 2/3] platform/x86: topstar-laptop: Check ACPI_COMPANION() against NULL Jiale Yao
2026-10-17  7:42 ` jiale yao
2026-10-19  6:09 ` [PATCH " Ilpo Järvinen
  -- strict thread matches above, loose matches on Subject: below --
2026-07-13 15:14 [PATCH v3 1/3] platform/x86: asus-wireless: " Jiale Yao
2026-07-13 15:14 ` [PATCH v3 2/3] platform/x86: topstar-laptop: " Jiale Yao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.