Skip to content

Commit 7bb84ca

Browse files
joshuagrishamij-intel
authored andcommitted
platform/x86: samsung-galaxybook: Fix block_recording not supported logic
Fixes logic error when block_recording is not supported but the fw attr was being added anyway (reported by GitHub user bbregeault). Tested myself on a Samsung Galaxy Book2 Pro (has block_recording) and by bbregeault on a Galaxy Book2 Business (does not have block_recording). Fixes: 56f529c ("platform/x86: samsung-galaxybook: Add samsung-galaxybook driver") Signed-off-by: Joshua Grisham <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 4878e0b commit 7bb84ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/platform/x86/samsung-galaxybook.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,11 +1100,13 @@ static int galaxybook_fw_attrs_init(struct samsung_galaxybook *galaxybook)
11001100
}
11011101

11021102
err = galaxybook_block_recording_init(galaxybook);
1103-
if (!err)
1104-
galaxybook->has_block_recording = true;
1105-
else if (err != GB_NOT_SUPPORTED)
1103+
if (err == GB_NOT_SUPPORTED)
1104+
return 0;
1105+
else if (err)
11061106
return err;
11071107

1108+
galaxybook->has_block_recording = true;
1109+
11081110
return galaxybook_fw_attr_init(galaxybook,
11091111
GB_ATTR_BLOCK_RECORDING,
11101112
&block_recording_acpi_get,

0 commit comments

Comments
 (0)