Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8648508 authored by Ameya Palande's avatar Ameya Palande Committed by Lee Jones
Browse files

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: default avatarAmeya Palande <2ameya@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3a43477f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;