summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmeya Palande <2ameya@gmail.com>2015-02-26 12:05:51 -0800
committerSasha Levin <sasha.levin@oracle.com>2015-04-16 20:13:19 -0400
commitbc9432581714eba5708f5187fb7fdd05a82adf09 (patch)
tree2d0f0efe87a8ad8cdb90b41e93370fe0aabfb67c
parent5f40212836297e746896c107accdcd31d14f3165 (diff)
mfd: kempld-core: Fix callback return value check
[ Upstream commit c8648508ebfc597058d2cd00b6c539110264a167 ] 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 <lee.jones@linaro.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--drivers/mfd/kempld-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index bd2696136eee..177fa31e5aad 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -740,7 +740,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;