Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 980f481d authored by Mario Limonciello's avatar Mario Limonciello Committed by Darren Hart (VMware)
Browse files

platform/x86: dell-smbios: only run if proper oem string is detected



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: default avatarMario Limonciello <mario.limonciello@dell.com>
Reviewed-by: default avatarEdward O'Callaghan <quasisec@google.com>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent f97e058c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)  {