Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933821AbbDUQGN (ORCPT ); Tue, 21 Apr 2015 12:06:13 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57538 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932355AbbDUPeX (ORCPT ); Tue, 21 Apr 2015 11:34:23 -0400 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Ameya Palande <2ameya@gmail.com>, Lee Jones , Luis Henriques Subject: [PATCH 3.16.y-ckt 087/144] mfd: kempld-core: Fix callback return value check Date: Tue, 21 Apr 2015 16:31:12 +0100 Message-Id: <1429630329-21748-88-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429630329-21748-1-git-send-email-luis.henriques@canonical.com> References: <1429630329-21748-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 36 3.16.7-ckt10 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Ameya Palande <2ameya@gmail.com> commit c8648508ebfc597058d2cd00b6c539110264a167 upstream. On success, callback function returns 0. So invert the if condition check so that we can break out of loop. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Lee Jones Signed-off-by: Luis Henriques --- 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 f7ff0188603d..7112308fa8be 100644 --- a/drivers/mfd/kempld-core.c +++ b/drivers/mfd/kempld-core.c @@ -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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/