Skip to content

Commit e71c848

Browse files
soyersoyerij-intel
authored andcommitted
platform/x86: lg-laptop: fix %s null argument warning
W=1 warns about null argument to kprintf: warning: ‘%s’ directive argument is null [-Wformat-overflow=] pr_info("product: %s year: %d\n", product, year); Use "unknown" instead of NULL. Signed-off-by: Gergo Koteles <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/33d40e976f08f82b9227d0ecae38c787fcc0c0b2.1712154684.git.soyer@irl.hu Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 434e578 commit e71c848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/lg-laptop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static int acpi_add(struct acpi_device *device)
736736
default:
737737
year = 2019;
738738
}
739-
pr_info("product: %s year: %d\n", product, year);
739+
pr_info("product: %s year: %d\n", product ?: "unknown", year);
740740

741741
if (year >= 2019)
742742
battery_limit_use_wmbb = 1;

0 commit comments

Comments
 (0)