From: Ameya Palande <2ameya@gmail.com> Date: Thu, 26 Feb 2015 20:05:51 +0000 (-0800) Subject: mfd: kempld-core: Fix callback return value check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c8648508ebfc597058d2cd00b6c539110264a167;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mfd: kempld-core: Fix callback return value check On success, callback function returns 0. So invert the if condition check so that we can break out of loop. Cc: stable@vger.kernel.org Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c index f38ec424872e..5615522f8d62 100644 --- a/drivers/mfd/kempld-core.c +++ b/drivers/mfd/kempld-core.c @@ -739,7 +739,7 @@ static int __init kempld_init(void) for (id = kempld_dmi_table; id->matches[0].slot != DMI_NONE; id++) if (strstr(id->ident, force_device_id)) - if (id->callback && id->callback(id)) + if (id->callback && !id->callback(id)) break; if (id->matches[0].slot == DMI_NONE) return -ENODEV;