From: Axel Lin Date: Mon, 18 Jul 2011 08:08:21 +0000 (+0800) Subject: platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 X-Git-Tag: firefly_0821_release~3680^2~4706^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=046f828b410837d304137cec9e4e0d72e50fc454;p=firefly-linux-kernel-4.4.55.git platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 We only care about if there is any successful match from the dmi table or no match at all, we can make dmi_check_system return immediately if we have a successful match instead of iterate thorough the whole table. Signed-off-by: Axel Lin Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c index 54cf3d63fe8d..1e54ae74274c 100644 --- a/drivers/platform/x86/samsung-q10.c +++ b/drivers/platform/x86/samsung-q10.c @@ -127,7 +127,7 @@ static struct platform_device *samsungq10_device; static int __init dmi_check_callback(const struct dmi_system_id *id) { printk(KERN_INFO KBUILD_MODNAME ": found model '%s'\n", id->ident); - return 0; + return 1; } static struct dmi_system_id __initdata samsungq10_dmi_table[] = {