summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorGergo Koteles <soyer@irl.hu>2024-04-03 16:34:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:30:40 +0200
commite6a4fe97c57fe0ce4a274e1e0e622c6db53ef2db (patch)
tree6b80f9d155a882900a0d12e4b1181b29e6323410 /drivers/platform
parentec9adc7ef912aa936c0caee7ddd771a61e91a3bd (diff)
downloadlinux-e6a4fe97c57fe0ce4a274e1e0e622c6db53ef2db.tar.gz
linux-e6a4fe97c57fe0ce4a274e1e0e622c6db53ef2db.tar.bz2
linux-e6a4fe97c57fe0ce4a274e1e0e622c6db53ef2db.zip
platform/x86: lg-laptop: fix %s null argument warning
[ Upstream commit e71c8481692582c70cdfd0996c20cdcc71e425d3 ] 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 <soyer@irl.hu> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Link: https://lore.kernel.org/r/33d40e976f08f82b9227d0ecae38c787fcc0c0b2.1712154684.git.soyer@irl.hu Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/lg-laptop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
index 2e1dc91bfc76..5704981d1848 100644
--- a/drivers/platform/x86/lg-laptop.c
+++ b/drivers/platform/x86/lg-laptop.c
@@ -715,7 +715,7 @@ static int acpi_add(struct acpi_device *device)
default:
year = 2019;
}
- pr_info("product: %s year: %d\n", product, year);
+ pr_info("product: %s year: %d\n", product ?: "unknown", year);
if (year >= 2019)
battery_limit_use_wmbb = 1;