linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Lukas Wunner <lukas@wunner.de>,
	Frank Pavlic <f.pavlic@kunbus.de>,
	Stephen Boyd <sboyd@codeaurora.org>, Nishanth Menon <nm@ti.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Sasha Levin (Microsoft)" <sashal@kernel.org>
Subject: [PATCH 4.19 34/72] net: ks8851: Reassert reset pin if chip ID check fails
Date: Thu,  2 May 2019 17:20:56 +0200	[thread overview]
Message-ID: <20190502143336.216832866@linuxfoundation.org> (raw)
In-Reply-To: <20190502143333.437607839@linuxfoundation.org>

[ Upstream commit 761cfa979a0c177d6c2d93ef5585cd79ae49a7d5 ]

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@wunner.de>
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
---
 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.19.1




  parent reply	other threads:[~2019-05-02 15:44 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 15:20 [PATCH 4.19 00/72] 4.19.39-stable review Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 01/72] selinux: use kernel linux/socket.h for genheaders and mdp Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 02/72] Revert "ACPICA: Clear status of GPEs before enabling them" Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 03/72] mm: make page ref count overflow check tighter and more explicit Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 04/72] mm: add try_get_page() helper function Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 05/72] mm: prevent get_user_pages() from overflowing page refcount Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 06/72] fs: prevent page refcount overflow in pipe_buf_get Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 07/72] ARM: dts: bcm283x: Fix hdmi hpd gpio pull Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 08/72] s390: limit brk randomization to 32MB Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 09/72] net: ieee802154: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-03  8:32   ` Pavel Machek
2019-05-02 15:20 ` [PATCH 4.19 10/72] ieee802154: hwsim: propagate genlmsg_reply return code Greg Kroah-Hartman
2019-05-03  8:33   ` Pavel Machek
2019-05-02 15:20 ` [PATCH 4.19 11/72] net: stmmac: dont set own bit too early for jumbo frames Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 12/72] qlcnic: Avoid potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 13/72] xsk: fix umem memory leak on cleanup Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 14/72] staging: axis-fifo: add CONFIG_OF dependency Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 15/72] staging, mt7621-pci: fix build without pci support Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 16/72] netfilter: nft_set_rbtree: check for inactive element after flag mismatch Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 17/72] netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 18/72] netfilter: fix NETFILTER_XT_TARGET_TEE dependencies Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 19/72] netfilter: ip6t_srh: fix NULL pointer dereferences Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 20/72] s390/qeth: fix race when initializing the IP address table Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 21/72] ARM: imx51: fix a leaked reference by adding missing of_node_put Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 22/72] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 23/72] serial: ar933x_uart: Fix build failure with disabled console Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 24/72] KVM: arm64: Reset the PMU in preemptible context Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 25/72] KVM: arm/arm64: vgic-its: Take the srcu lock when writing to guest memory Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 26/72] KVM: arm/arm64: vgic-its: Take the srcu lock when parsing the memslots Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 27/72] usb: dwc3: pci: add support for Comet Lake PCH ID Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 28/72] usb: gadget: net2280: Fix overrun of OUT messages Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 29/72] usb: gadget: net2280: Fix net2280_dequeue() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 30/72] usb: gadget: net2272: Fix net2272_dequeue() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 31/72] ARM: dts: pfla02: increase phy reset duration Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 32/72] i2c: i801: Add support for Intel Comet Lake Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 33/72] net: ks8851: Dequeue RX packets explicitly Greg Kroah-Hartman
2019-05-02 15:20 ` Greg Kroah-Hartman [this message]
2019-05-02 15:20 ` [PATCH 4.19 35/72] net: ks8851: Delay requesting IRQ until opened Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 36/72] net: ks8851: Set initial carrier state to down Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 4.19 37/72] staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 38/72] staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 39/72] staging: rtl8712: uninitialized memory in read_bbreg_hdl() Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 40/72] staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 41/72] net: macb: Add null check for PCLK and HCLK Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 42/72] net/sched: dont dereference a->goto_chain to read the chain index Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 43/72] ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 44/72] drm/tegra: hub: Fix dereference before check Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 45/72] NFS: Fix a typo in nfs_init_timeout_values() Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 46/72] net: xilinx: fix possible object reference leak Greg Kroah-Hartman
2019-05-03 10:08   ` Pavel Machek
     [not found]     ` <201905051417486865228@zte.com.cn>
2019-05-06 17:48       ` [PATCH 4.19 46/72] net: xilinx: fix possible object referenceleak Pavel Machek
2019-05-02 15:21 ` [PATCH 4.19 47/72] net: ibm: fix possible object reference leak Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 48/72] net: ethernet: ti: " Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 49/72] drm: Fix drm_release() and device unplug Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 50/72] gpio: aspeed: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 51/72] drm/meson: Fix invalid pointer in meson_drv_unbind() Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 52/72] drm/meson: Uninstall IRQ handler Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 53/72] ARM: davinci: fix build failure with allnoconfig Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 54/72] scsi: mpt3sas: Fix kernel panic during expander reset Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 55/72] scsi: aacraid: Insure we dont access PCIe space during AER/EEH Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 56/72] scsi: qla4xxx: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 57/72] usb: usb251xb: fix to avoid " Greg Kroah-Hartman
2019-05-03 21:32   ` Pavel Machek
2019-05-04  6:45     ` Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 58/72] leds: trigger: netdev: fix refcnt leak on interface rename Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 59/72] x86/realmode: Dont leak the trampoline kernel address Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 60/72] usb: u132-hcd: fix resource leak Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 61/72] ceph: fix use-after-free on symlink traversal Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 62/72] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 63/72] x86/mm: Dont exceed the valid physical address space Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 64/72] libata: fix using DMA buffers on stack Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 65/72] gpio: of: Fix of_gpiochip_add() error path Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 66/72] nvme-multipath: relax ANA state check Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 67/72] perf machine: Update kernel map address and re-order properly Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 68/72] kconfig/[mn]conf: handle backspace (^H) key Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 69/72] iommu/amd: Reserve exclusion range in iova-domain Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 70/72] ptrace: take into account saved_sigmask in PTRACE{GET,SET}SIGMASK Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 71/72] leds: pca9532: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 4.19 72/72] leds: trigger: netdev: use memcpy in device_name_store Greg Kroah-Hartman
2019-05-02 22:46 ` [PATCH 4.19 00/72] 4.19.39-stable review kernelci.org bot
2019-05-03  7:26 ` Naresh Kamboju
2019-05-03  9:27 ` Jon Hunter
2019-05-03 17:16 ` Guenter Roeck
2019-05-03 21:20 ` shuah
2019-05-04  6:54 ` Pavel Machek
2019-05-04  7:18   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190502143336.216832866@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=f.pavlic@kunbus.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nm@ti.com \
    --cc=sashal@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).