Skip to content

Commit

Permalink
platform/x86: dell-smbios: only run if proper oem string is detected
Browse files Browse the repository at this point in the history
The proper way to indicate that a system is a 'supported' Dell System
is by the presence of this string in OEM strings.

Allowing the driver to load on non-Dell systems will have undefined
results.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Reviewed-by: Edward O'Callaghan <quasisec@google.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
  • Loading branch information
Mario Limonciello authored and Darren Hart (VMware) committed Nov 3, 2017
1 parent f97e058 commit 980f481
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/platform/x86/dell-smbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,15 @@ static void __init find_tokens(const struct dmi_header *dm, void *dummy)

static int __init dell_smbios_init(void)
{
const struct dmi_device *valid;
int ret;

valid = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL);
if (!valid) {
pr_err("Unable to run on non-Dell system\n");
return -ENODEV;
}

dmi_walk(find_tokens, NULL);

if (!da_tokens) {
Expand Down

0 comments on commit 980f481

Please sign in to comment.