* [PATCH] mfd: kempld-core: Fix callback return value check
@ 2015-02-26 20:05 Ameya Palande
2015-03-06 12:04 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Ameya Palande @ 2015-02-26 20:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Lee Jones, Samuel Ortiz, Ameya Palande
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>
---
drivers/mfd/kempld-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index f38ec42..5615522 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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: kempld-core: Fix callback return value check
2015-02-26 20:05 [PATCH] mfd: kempld-core: Fix callback return value check Ameya Palande
@ 2015-03-06 12:04 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2015-03-06 12:04 UTC (permalink / raw)
To: Ameya Palande; +Cc: linux-kernel, Samuel Ortiz
On Thu, 26 Feb 2015, Ameya Palande wrote:
> 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>
> ---
> drivers/mfd/kempld-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
> diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
> index f38ec42..5615522 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;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-06 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 20:05 [PATCH] mfd: kempld-core: Fix callback return value check Ameya Palande
2015-03-06 12:04 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox