lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231020091413.205743-1-suhui@nfschina.com>
Date:   Fri, 20 Oct 2023 17:14:13 +0800
From:   Su Hui <suhui@...china.com>
To:     vkoul@...nel.org, kishon@...nel.org
Cc:     Su Hui <suhui@...china.com>, u.kleine-koenig@...gutronix.de,
        linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] phy: mapphone-mdm6600: fix an error code problem in phy_mdm6600_device_power_on

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 <suhui@...china.com>
---

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ