mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
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 <lee.jones@linaro.org>
This commit is contained in:
parent
3a43477fa3
commit
c8648508eb
@ -739,7 +739,7 @@ static int __init kempld_init(void)
|
|||||||
for (id = kempld_dmi_table;
|
for (id = kempld_dmi_table;
|
||||||
id->matches[0].slot != DMI_NONE; id++)
|
id->matches[0].slot != DMI_NONE; id++)
|
||||||
if (strstr(id->ident, force_device_id))
|
if (strstr(id->ident, force_device_id))
|
||||||
if (id->callback && id->callback(id))
|
if (id->callback && !id->callback(id))
|
||||||
break;
|
break;
|
||||||
if (id->matches[0].slot == DMI_NONE)
|
if (id->matches[0].slot == DMI_NONE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
Loading…
Reference in New Issue
Block a user