Commit a58c7438 authored by Ameya Palande's avatar Ameya Palande Committed by Luis Henriques

mfd: kempld-core: Fix callback return value check

commit c8648508 upstream.

On success, callback function returns 0. So invert the if condition
check so that we can break out of loop.
Signed-off-by: default avatarAmeya Palande <2ameya@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 4c15e32a
......@@ -738,7 +738,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment