mfd: kempld-core: Fix callback return value check

commit c8648508eb upstream.

On success, callback function returns 0. So invert the if condition
check so that we can break out of loop.

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ameya Palande 2015-02-26 12:05:51 -08:00 committed by Greg Kroah-Hartman
parent d970996223
commit 98f97ba3e0
1 changed files with 1 additions and 1 deletions

View File

@ -629,7 +629,7 @@ static int __init kempld_init(void)
if (force_device_id[0]) {
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;