From patchwork Thu Jun 12 07:32:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 359026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4845C140085 for ; Thu, 12 Jun 2014 17:32:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932147AbaFLHcI (ORCPT ); Thu, 12 Jun 2014 03:32:08 -0400 Received: from top.free-electrons.com ([176.31.233.9]:37691 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932194AbaFLHcH (ORCPT ); Thu, 12 Jun 2014 03:32:07 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 89FF17E9; Thu, 12 Jun 2014 09:32:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost.localdomain (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id DFA6C60F; Thu, 12 Jun 2014 09:32:05 +0200 (CEST) From: Boris BREZILLON To: kbuild test robot , Wolfram Sang Cc: Maxime Ripard , Shuge , kevin@allwinnertech.com, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, Boris BREZILLON Subject: [PATCH] i2c: sun6-p2wi: fix erroneous error message Date: Thu, 12 Jun 2014 09:32:01 +0200 Message-Id: <1402558321-18981-1-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <53994cdd.dj2lZ0lrPyPuIr9Z%fengguang.wu@intel.com> References: <53994cdd.dj2lZ0lrPyPuIr9Z%fengguang.wu@intel.com> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The variable containing the return value of platform_get_irq is irq not ret, this means the error code printed in the error message will be false. Signed-off-by: Boris BREZILLON Reported-by: Fengguang Wu --- Hello Wolfram, This patch fixes a bug reported by Fengguang's build robot. I know you've already applied my series to your for-next tree, but let me know if you want me to squash this patch into the P2WI series and send a v8. Best Regards, Boris drivers/i2c/busses/i2c-sun6i-p2wi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c index f1d3e6f..5d2d678 100644 --- a/drivers/i2c/busses/i2c-sun6i-p2wi.c +++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c @@ -240,7 +240,7 @@ static int p2wi_probe(struct platform_device *pdev) snprintf(p2wi->adapter.name, sizeof(p2wi->adapter.name), pdev->name); irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(dev, "failed to retrieve irq: %d\n", ret); + dev_err(dev, "failed to retrieve irq: %d\n", irq); return irq; }