From patchwork Thu Apr 5 09:46:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 895327 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EYKvRjcO"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Gyg90qrmz9s0p for ; Thu, 5 Apr 2018 19:47:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=C5USE5AJ7vqtGJcsugfITWljpWkIMxUOJNa0qTjPsdc=; b=EYKvRjcOiiROU2 eoFg7h1Y2PB94BizLIXsnL8PgV2rMkxmcW1q8oevmxIcr5FTl4Y2ZDyte4XdWU8jO9LwCGaT1AfjG C/Enfa3WEoCiHiM1D4bukYu77BoLMynYqvzdqtC+it5G527TktoEM2MUSTFvI24rD3uONQC5UWMxf Unk2YKDAHZhIwlzHkeDY+oH7O8YfCxtza3THS/dcacR00k+/mwWfPln2tSed0XDSGQmgLWwJQlq/v Nykd61bSs+ake2ha8MbUqlLZURnN6rRK+z/nWiAEQUAxFAqzUXJTTnfQYdfv52PGCfxzFwbXl2wyz m8t8vmIWe7R7nrdzR3MQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f41Uc-0005Bo-Pz; Thu, 05 Apr 2018 09:47:42 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f41UW-00056N-O1 for linux-arm-kernel@lists.infradead.org; Thu, 05 Apr 2018 09:47:39 +0000 Received: from ayla.of.borg ([84.194.111.163]) by baptiste.telenet-ops.be with bizsmtp id WZn11x00D3XaVaC01Zn1F2; Thu, 05 Apr 2018 11:47:06 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1f41Tx-0007zm-5r; Thu, 05 Apr 2018 11:47:01 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1f41Tx-0001WD-4o; Thu, 05 Apr 2018 11:47:01 +0200 From: Geert Uytterhoeven To: Kishon Vijay Abraham I , Maxime Coquelin , Alexandre Torgue , Delaunay Subject: [PATCH] phy: stm32: Fix printing of wrong uninitialized port number Date: Thu, 5 Apr 2018 11:46:59 +0200 Message-Id: <1522921619-5790-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180405_024736_955135_2E1BEB19 X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a02:1800:120:4:0:0:f00:13 listed in] [list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org drivers/phy/st/phy-stm32-usbphyc.c: In function ‘stm32_usbphyc_probe’: drivers/phy/st/phy-stm32-usbphyc.c:364: warning: ‘i’ may be used uninitialized in this function Indeed, during the first loop iteration, "i" is uninitialized. However, "i" does not represent the intended PHY instance number to print. Fix this by printing the correct variable instead. Fixes: 94c358da3a054520 ("phy: stm32: add support for STM32 USB PHY Controller (USBPHYC)") Signed-off-by: Geert Uytterhoeven --- drivers/phy/st/phy-stm32-usbphyc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c index bc4e78a19c913dc9..1f682c176fd6239e 100644 --- a/drivers/phy/st/phy-stm32-usbphyc.c +++ b/drivers/phy/st/phy-stm32-usbphyc.c @@ -367,8 +367,8 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) if (IS_ERR(phy)) { ret = PTR_ERR(phy); if (ret != -EPROBE_DEFER) - dev_err(dev, - "failed to create phy%d: %d\n", i, ret); + dev_err(dev, "failed to create phy%d: %d\n", + port, ret); goto put_child; }