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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0d087ba428c7f43629161350baa479ff5af8b52d.1553089248.git.lukas@wunner.de>
Date:   Wed, 20 Mar 2019 15:02:00 +0100
From:   Lukas Wunner <lukas@...ner.de>
To:     "David S. Miller" <davem@...emloft.net>,
        Tristram Ha <Tristram.Ha@...rochip.com>, netdev@...r.kernel.org
Cc:     Frank Pavlic <f.pavlic@...bus.de>,
        Eduard Mainhardt <e.mainhardt@...bus.de>,
        Ben Dooks <ben.dooks@...ethink.co.uk>,
        Nishanth Menon <nm@...com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Sergey Shcherbakov <shchers@...il.com>,
        Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>
Subject: [PATCH 2/6] net: ks8851: Reassert reset pin if chip ID check fails

Commit 73fdeb82e963 ("net: ks8851: Add optional vdd_io regulator and
reset gpio") amended the ks8851 driver to briefly assert the chip's
reset pin on probe. It also amended the probe routine's error path to
reassert the reset pin if a subsequent initialization step fails.

However the commit misplaced reassertion of the reset pin in the error
path such that it is not performed if the check of the Chip ID and
Enable Register (CIDER) fails. The error path is therefore slightly
asymmetrical to the probe routine's body. Fix it.

Signed-off-by: Lukas Wunner <lukas@...ner.de>
Cc: Frank Pavlic <f.pavlic@...bus.de>
Cc: Stephen Boyd <sboyd@...eaurora.org>
Cc: Nishanth Menon <nm@...com>
---
 drivers/net/ethernet/micrel/ks8851.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index a93f8e842c07..1633fa5c709c 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1554,9 +1554,9 @@ static int ks8851_probe(struct spi_device *spi)
 	free_irq(ndev->irq, ks);
 
 err_irq:
+err_id:
 	if (gpio_is_valid(gpio))
 		gpio_set_value(gpio, 0);
-err_id:
 	regulator_disable(ks->vdd_reg);
 err_reg:
 	regulator_disable(ks->vdd_io);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ