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: <20170315113155.10242-1-p.zabel@pengutronix.de>
Date:   Wed, 15 Mar 2017 12:31:55 +0100
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     linux-usb@...r.kernel.org
Cc:     Patrice Chotard <patrice.chotard@...com>,
        Alan Stern <stern@...land.harvard.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Philipp Zabel <p.zabel@...gutronix.de>
Subject: [PATCH v2 13/14] usb: host: ehci-st: simplify optional reset handling

As of commit bb475230b8e5 ("reset: make optional functions really
optional"), the reset framework API calls use NULL pointers to describe
optional, non-present reset controls.

This allows to return errors from devm_reset_control_get_optional_shared
unconditionally.

Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
---
 drivers/usb/host/ehci-st.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/host/ehci-st.c b/drivers/usb/host/ehci-st.c
index be4a2788fc582..12e803d2c98df 100644
--- a/drivers/usb/host/ehci-st.c
+++ b/drivers/usb/host/ehci-st.c
@@ -210,18 +210,14 @@ static int st_ehci_platform_probe(struct platform_device *dev)
 		devm_reset_control_get_optional_shared(&dev->dev, "power");
 	if (IS_ERR(priv->pwr)) {
 		err = PTR_ERR(priv->pwr);
-		if (err == -EPROBE_DEFER)
-			goto err_put_clks;
-		priv->pwr = NULL;
+		goto err_put_clks;
 	}
 
 	priv->rst =
 		devm_reset_control_get_optional_shared(&dev->dev, "softreset");
 	if (IS_ERR(priv->rst)) {
 		err = PTR_ERR(priv->rst);
-		if (err == -EPROBE_DEFER)
-			goto err_put_clks;
-		priv->rst = NULL;
+		goto err_put_clks;
 	}
 
 	if (pdata->power_on) {
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ