Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965331AbbD0VdA (ORCPT ); Mon, 27 Apr 2015 17:33:00 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:49570 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965163AbbD0Vc4 (ORCPT ); Mon, 27 Apr 2015 17:32:56 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ameya Palande <2ameya@gmail.com>, Lee Jones , Jiri Slaby Subject: [PATCH 3.12 05/83] mfd: kempld-core: Fix callback return value check Date: Mon, 27 Apr 2015 23:31:36 +0200 Message-Id: X-Mailer: git-send-email 2.3.5 In-Reply-To: <3426bb8de3a655aa6668e92ee92eb35f0db86582.1430159990.git.jslaby@suse.cz> References: <3426bb8de3a655aa6668e92ee92eb35f0db86582.1430159990.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 39 From: Ameya Palande <2ameya@gmail.com> 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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: Jiri Slaby --- 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 38917a822335..2df3cbc968d1 100644 --- a/drivers/mfd/kempld-core.c +++ b/drivers/mfd/kempld-core.c @@ -629,7 +629,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; -- 2.3.5 -- 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/