* [PATCH] platform/x86: samsung-galaxybook: Fix block_recording not supported logic
@ 2025-03-02 20:53 Joshua Grisham
2025-03-03 10:53 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Joshua Grisham @ 2025-03-02 20:53 UTC (permalink / raw)
To: W_Armin, thomas, kuurtb, ilpo.jarvinen, hdegoede,
platform-driver-x86, linux-kernel
Cc: Joshua Grisham
Fixes logic error when block_recording is not supported but the fw attr is
being added anyway (reported by GitHub user bbregeault).
Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
---
drivers/platform/x86/samsung-galaxybook.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/samsung-galaxybook.c b/drivers/platform/x86/samsung-galaxybook.c
index de1ed2dc6..5878a3519 100644
--- a/drivers/platform/x86/samsung-galaxybook.c
+++ b/drivers/platform/x86/samsung-galaxybook.c
@@ -1100,11 +1100,13 @@ static int galaxybook_fw_attrs_init(struct samsung_galaxybook *galaxybook)
}
err = galaxybook_block_recording_init(galaxybook);
- if (!err)
- galaxybook->has_block_recording = true;
- else if (err != GB_NOT_SUPPORTED)
+ if (err == GB_NOT_SUPPORTED)
+ return 0;
+ else if (err)
return err;
+ galaxybook->has_block_recording = true;
+
return galaxybook_fw_attr_init(galaxybook,
GB_ATTR_BLOCK_RECORDING,
&block_recording_acpi_get,
--
2.45.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: samsung-galaxybook: Fix block_recording not supported logic
2025-03-02 20:53 [PATCH] platform/x86: samsung-galaxybook: Fix block_recording not supported logic Joshua Grisham
@ 2025-03-03 10:53 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-03-03 10:53 UTC (permalink / raw)
To: Joshua Grisham
Cc: W_Armin, thomas, kuurtb, Hans de Goede, platform-driver-x86, LKML
On Sun, 2 Mar 2025, Joshua Grisham wrote:
> Fixes logic error when block_recording is not supported but the fw attr is
> being added anyway (reported by GitHub user bbregeault).
>
> Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
Please add a Fixes tag.
--
i.
> ---
> drivers/platform/x86/samsung-galaxybook.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/samsung-galaxybook.c b/drivers/platform/x86/samsung-galaxybook.c
> index de1ed2dc6..5878a3519 100644
> --- a/drivers/platform/x86/samsung-galaxybook.c
> +++ b/drivers/platform/x86/samsung-galaxybook.c
> @@ -1100,11 +1100,13 @@ static int galaxybook_fw_attrs_init(struct samsung_galaxybook *galaxybook)
> }
>
> err = galaxybook_block_recording_init(galaxybook);
> - if (!err)
> - galaxybook->has_block_recording = true;
> - else if (err != GB_NOT_SUPPORTED)
> + if (err == GB_NOT_SUPPORTED)
> + return 0;
> + else if (err)
> return err;
>
> + galaxybook->has_block_recording = true;
> +
> return galaxybook_fw_attr_init(galaxybook,
> GB_ATTR_BLOCK_RECORDING,
> &block_recording_acpi_get,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-03 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-02 20:53 [PATCH] platform/x86: samsung-galaxybook: Fix block_recording not supported logic Joshua Grisham
2025-03-03 10:53 ` 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
all inboxes | Powered by JetHome®