Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp886501rdb; Fri, 20 Oct 2023 02:14:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHb4sWwecrXctthaHSjadu4m3nTDjQrW/o5sChx35WCwBFgHocxczwfEZMZ/8vc1zlV7/Cf X-Received: by 2002:a17:90a:5b08:b0:27d:54b9:c3c5 with SMTP id o8-20020a17090a5b0800b0027d54b9c3c5mr1319555pji.17.1697793290210; Fri, 20 Oct 2023 02:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697793290; cv=none; d=google.com; s=arc-20160816; b=DZRDVjGpPHoBa1yQhAQn7MeDvlPVWqY1lM+/e/VT6zH4BhGcBcn0vglUlKk696v+Ll 5xsl297X2vueKf6O9iKKkFFtEkyhvdLxeci9Cibv3uzfgggs+PcK3j/CYGkU6WbfV8aR OR4F7Wc1He6H2+1a/yqED/OSRaGw+fk6Uon0QA55P7ArB9kN4kOZaOnwftFeGOwvjzrr lkBDd9fOIaXjBmW1IGEPp6dzSSUr3ff9cxx1hMLEQzXp4UZX0y+UA8TbFdUg3PD7LsXA LjOH9inmIA/o3FsDWw/Tun62HLqfL9pI4omKo3XP+LFVPk/GkThbGghhXsFE1DLA6X2b PWbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nWlaUzGGMqVyqvtld/qegPssHP1WYT1/dwmz53W9qLQ=; fh=W5BDNDTjpYRR+cPhqXRCBz28hymArnu2fPl3iKR4saM=; b=esKaQc82baW17vo9hBgGol+bv+8TgGOSq262+c/A2T9lyfgkC1KHQ3UluaLFpRYLsN sug/Jo5TGK256unZScQamI/hlr0sHr5YAtThKB7eH0mWWgMV2PWxcdycGNHE2B2p7SzM p2GrJyG2paT3O9DTiEsPnwEpepOB7xaR48y9nQGVnR/mh0XYB06kvaLQ1jWk1XgBOwn9 0a6NkqiqVsQcY7GeuG5qEvg7HmDJ8XG3wf6dZNAngAjkMbb1WWDipf9drPsBDnsktABR GmysvH7e/n6r+ZEqQL1jdUtIpVZVR9GrGuyTeamo1g1zEwkl3e+0NiwxFt4LL1Tlu/AG jF3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bb18-20020a17090b009200b002790b1320d4si4025797pjb.84.2023.10.20.02.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D7E7F8305909; Fri, 20 Oct 2023 02:14:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376608AbjJTJOl (ORCPT + 99 others); Fri, 20 Oct 2023 05:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376523AbjJTJOk (ORCPT ); Fri, 20 Oct 2023 05:14:40 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 73B6D106; Fri, 20 Oct 2023 02:14:38 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 3D205604AABDF; Fri, 20 Oct 2023 17:14:34 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: vkoul@kernel.org, kishon@kernel.org Cc: Su Hui , u.kleine-koenig@pengutronix.de, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/2] phy: mapphone-mdm6600: fix an error code problem in phy_mdm6600_device_power_on Date: Fri, 20 Oct 2023 17:14:13 +0800 Message-Id: <20231020091413.205743-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 02:14:48 -0700 (PDT) When wait_for_completion_timeout() failed, error is assigned '-ETIMEDOUT'. But this error code is never used. Return '-ETIMEDOUT' directly to fix this problem. Signed-off-by: Su Hui --- I'm not sure that return directly is true or not, maybe need some process before return directly. drivers/phy/motorola/phy-mapphone-mdm6600.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c index 1d567604b650..e84e3390bff0 100644 --- a/drivers/phy/motorola/phy-mapphone-mdm6600.c +++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c @@ -421,8 +421,8 @@ static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata) dev_info(ddata->dev, "Powered up OK\n"); } else { ddata->enabled = false; - error = -ETIMEDOUT; dev_err(ddata->dev, "Timed out powering up\n"); + return -ETIMEDOUT; } /* Reconfigure mode1 GPIO as input for OOB wake */ -- 2.30.2