summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/kempld-core.c
diff options
context:
space:
mode:
authorAmeya Palande <2ameya@gmail.com>2015-02-26 21:05:51 +0100
committerLee Jones <lee.jones@linaro.org>2015-03-12 10:27:58 +0100
commitc8648508ebfc597058d2cd00b6c539110264a167 (patch)
tree448d242826fff71ce3a1115e37d8d318fe103d8c /drivers/mfd/kempld-core.c
parentmfd: rtsx_usb: Prevent DMA from stack (diff)
downloadlinux-c8648508ebfc597058d2cd00b6c539110264a167.tar.xz
linux-c8648508ebfc597058d2cd00b6c539110264a167.zip
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>
Diffstat (limited to 'drivers/mfd/kempld-core.c')
-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 f38ec424872e..5615522f8d62 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -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;