From ade5ee8b807920270a77904ddf83ac480ab0d61b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 4 Sep 2018 10:14:37 -0600 Subject: [PATCH] Return ENODEV when model is not matched --- system76.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system76.c b/system76.c index ea91bad..e47460d 100644 --- a/system76.c +++ b/system76.c @@ -264,7 +264,10 @@ static struct dmi_system_id s76_dmi_table[] __initdata = { MODULE_DEVICE_TABLE(dmi, s76_dmi_table); static int __init s76_init(void) { - dmi_check_system(s76_dmi_table); + if (!dmi_check_system(s76_dmi_table) > 0) { + S76_INFO("Model does not utilize this driver"); + return -ENODEV; + } if (!wmi_has_guid(S76_EVENT_GUID)) { S76_INFO("No known WMI event notification GUID found\n");