Skip to content

Commit

Permalink
mfd: kempld-core: Fix callback return value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
2ameya authored and Lee Jones committed Mar 12, 2015
1 parent 3a43477 commit c864850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/kempld-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c864850

Please sign in to comment.