linux_dsm_epyc7002/drivers/usb/host
Evgeny Novikov e1f5cb454f usb: ehci-orion: Handle errors of clk_prepare_enable() in probe
[ Upstream commit 4720f1bf4ee4a784d9ece05420ba33c9222a3004 ]

ehci_orion_drv_probe() did not account for possible errors of
clk_prepare_enable() that in particular could cause invocation of
clk_disable_unprepare() on clocks that were not prepared/enabled yet,
e.g. in remove or on handling errors of usb_add_hcd() in probe. Though,
there were several patches fixing different issues with clocks in this
driver, they did not solve this problem.

Add handling of errors of clk_prepare_enable() in ehci_orion_drv_probe()
to avoid calls of clk_disable_unprepare() without previous successful
invocation of clk_prepare_enable().

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 8c869edaee ("ARM: Orion: EHCI: Add support for enabling clocks")
Co-developed-by: Kirill Shilimanov <kirill.shilimanov@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Kirill Shilimanov <kirill.shilimanov@huawei.com>
Link: https://lore.kernel.org/r/20210825170902.11234-1-novikov@ispras.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 19:12:31 +02:00
..
bcma-hcd.c USB: bcma: use module_bcma_driver to simplify the code 2020-09-22 10:37:13 +02:00
ehci-atmel.c
ehci-brcm.c usb: ehci: Add new EHCI driver for Broadcom STB SoC's 2020-05-13 14:28:01 +02:00
ehci-dbg.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ehci-exynos.c usb: host: ehci-exynos: Fix error check in exynos_ehci_probe() 2020-06-18 10:40:57 +02:00
ehci-fsl.c usb: host: Use fallthrough pseudo-keyword 2020-07-10 08:55:18 +02:00
ehci-fsl.h USB: host: Use the correct style for SPDX License Identifier 2020-04-16 14:32:46 +02:00
ehci-grlib.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ehci-hcd.c usb: ehci: Prevent missed ehci interrupts with edge-triggered MSI 2021-07-28 14:35:48 +02:00
ehci-hub.c USB: ehci: fix an interrupt calltrace error 2021-01-27 11:55:16 +01:00
ehci-mem.c
ehci-mv.c USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int 2020-05-19 15:11:43 +02:00
ehci-mxc.c USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe() 2020-05-19 15:12:21 +02:00
ehci-npcm7xx.c usb/host: ehci-npcm7xx: Use pm_ptr() macro 2020-09-04 16:54:47 +02:00
ehci-omap.c usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe 2020-12-30 11:53:44 +01:00
ehci-orion.c usb: ehci-orion: Handle errors of clk_prepare_enable() in probe 2024-07-05 19:12:31 +02:00
ehci-pci.c USB:ehci:fix Kunpeng920 ehci hardware problem 2024-07-05 18:53:11 +02:00
ehci-platform.c usb: host: ehci-platform: Add workaround for brcm, xgs-iproc-ehci 2020-09-14 16:45:28 +02:00
ehci-pmcmsp.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ehci-ppc-of.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ehci-ps3.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ehci-q.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ehci-rtk.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ehci-sched.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ehci-sh.c usb: host: ehci-sh: Remove unused platform data support 2019-12-10 11:34:27 +01:00
ehci-spear.c usb/host: ehci-spear: Use pm_ptr() macro 2020-09-04 16:54:45 +02:00
ehci-st.c
ehci-sysfs.c
ehci-tegra.c usb: host: ehci-tegra: Fix error handling in tegra_ehci_probe() 2020-10-28 13:23:07 +01:00
ehci-timer.c
ehci-xilinx-of.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ehci.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00
fhci-dbg.c
fhci-hcd.c usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough 2020-02-19 11:08:52 +01:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c USB/Thunderbolt patches for 5.9-rc1 2020-08-05 12:13:10 -07:00
fhci-tds.c usb: host: fhci-tds: Remove unused variables 'buf' and 'extra_data' 2020-07-09 17:19:59 +02:00
fhci.h USB: host: Use the correct style for SPDX License Identifier 2020-04-16 14:32:46 +02:00
fotg210-hcd.c usb: fotg210-hcd: Fix an error message 2021-05-19 10:13:13 +02:00
fotg210.h USB: Replace zero-length array with flexible-array member 2020-02-23 19:24:51 +01:00
fsl-mph-dr-of.c usb: host: fsl-mph-dr-of: check return of dma_set_mask() 2020-10-28 13:19:31 +01:00
imx21-dbg.c usb: host: imx21: create debugfs directory under usb root 2019-11-14 11:14:54 +08:00
imx21-hcd.c usb: host: imx21-hcd: Demote function header which is clearly not kerneldoc 2020-07-09 17:19:57 +02:00
imx21-hcd.h USB: host: Use the correct style for SPDX License Identifier 2020-04-16 14:32:46 +02:00
isp116x-hcd.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
isp116x.h
isp1362-hcd.c usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
isp1362.h usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused 2020-07-03 10:18:40 +02:00
Kconfig init: add dsm gpl source 2024-07-05 18:00:04 +02:00
Makefile init: add dsm gpl source 2024-07-05 18:00:04 +02:00
max3421-hcd.c usb: max-3421: Prevent corruption of freed memory 2021-07-28 14:35:44 +02:00
ohci-at91.c usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses 2024-07-05 18:52:27 +02:00
ohci-da8xx.c usb: ohci-da8xx: ensure error return on variable error is set 2020-01-08 17:34:18 +01:00
ohci-dbg.c
ohci-exynos.c usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe() 2020-08-27 09:25:58 +02:00
ohci-hcd.c usb: ohci: Make distrust_firmware param default to false 2020-09-14 16:48:26 +02:00
ohci-hub.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ohci-mem.c
ohci-nxp.c usb: ohci-nxp: fix use of integer as pointer 2019-11-04 15:50:38 +01:00
ohci-omap.c usb: ohci-omap: Fix descriptor conversion 2020-12-04 16:03:52 +01:00
ohci-pci.c USB: OHCI: remove obsolete FIXME comment 2020-06-19 08:58:44 +02:00
ohci-platform.c usb/ohci-platform: Fix a warning when hibernating 2020-05-18 18:15:39 +02:00
ohci-ppc-of.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ohci-ps3.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ohci-pxa27x.c usb: host: ohci-pxa27x: Fix and & vs | typo 2019-08-21 09:59:30 -07:00
ohci-q.c USB: OHCI: Use fallthrough pseudo-keyword 2020-07-10 08:55:18 +02:00
ohci-rtk.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ohci-s3c2410.c usb: host: ohci-s3c2410: Demote obvious misuse of kerneldoc to standard comment block 2020-07-09 16:46:57 +02:00
ohci-sa1111.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
ohci-sm501.c USB: ohci-sm501: Add missed iounmap() in remove 2020-06-18 10:42:53 +02:00
ohci-spear.c
ohci-st.c
ohci-tmio.c usb: host: ohci-tmio: add IRQ check 2024-07-05 19:11:56 +02:00
ohci.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00
oxu210hp-hcd.c usb: oxu210hp-hcd: Fix memory leak in oxu_create 2020-12-30 11:53:44 +01:00
pci-quirks.c usb: pci-quirks: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
pci-quirks.h
r8a66597-hcd.c usb: host: r8a66597-hcd: Remove set, then over-written, but never used variable 'tmp' 2020-07-09 17:19:57 +02:00
r8a66597.h USB: host: Use the correct style for SPDX License Identifier 2020-04-16 14:32:46 +02:00
sl811_cs.c
sl811-hcd.c usb: sl811-hcd: improve misleading indentation 2021-05-22 11:40:51 +02:00
sl811.h
ssb-hcd.c
u132-hcd.c usb: host: u132-hcd: Remove u132_static_list and list head u132_list 2020-04-16 14:32:46 +02:00
uhci-debug.c
uhci-grlib.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
uhci-hcd.c
uhci-hcd.h
uhci-hub.c
uhci-pci.c usb: hci: add hc_driver as argument for usb_hcd_pci_probe 2020-05-15 15:44:34 +02:00
uhci-platform.c usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
uhci-q.c
xhci-dbg.c
xhci-dbgcap.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xhci-dbgcap.h xhci: dbc: remove tty specific port structure from struct xhci_dbc 2020-07-23 17:05:29 +02:00
xhci-dbgtty.c usb: xhci: convert tasklets to use new tasklet_setup() API 2020-08-18 13:00:01 +02:00
xhci-debugfs.c xhci: fix unsafe memory usage in xhci tracing 2024-07-05 19:07:34 +02:00
xhci-debugfs.h usb: xhci: add debugfs support for ep with stream 2020-09-20 16:18:00 +02:00
xhci-ext-caps.c xhci-ext-caps.c: Add missing platform_device_put() on error in xhci_create_intel_xhci_sw_pdev() 2019-10-04 14:37:53 +02:00
xhci-ext-caps.h usb: xhci: Increase timeout for HC halt 2021-05-19 10:13:15 +02:00
xhci-histb.c xhci: hisilicon: fix refercence leak in xhci_histb_probe 2020-11-13 14:32:43 +01:00
xhci-hub.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xhci-mem.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xhci-mtk-sch.c usb: xhci-mtk: improve bandwidth scheduling with TT 2021-05-14 09:49:57 +02:00
xhci-mtk.c usb: xhci-mtk: support quirk to disable usb2 lpm 2021-05-11 14:47:19 +02:00
xhci-mtk.h usb: xhci-mtk: improve bandwidth scheduling with TT 2021-05-14 09:49:57 +02:00
xhci-mvebu.c usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 2021-02-10 09:29:10 +01:00
xhci-mvebu.h usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 2021-02-10 09:29:10 +01:00
xhci-pci-renesas.c usb: renesas-xhci: Prefer firmware loading on unknown ROM state 2024-07-05 18:57:30 +02:00
xhci-pci.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xhci-pci.h usb: xhci: make symbols static 2020-05-19 14:11:55 +02:00
xhci-plat.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xhci-plat.h usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 2021-02-10 09:29:10 +01:00
xhci-rcar.c usb: host: xhci-rcar: Don't reload firmware after the completion 2024-07-05 19:07:26 +02:00
xhci-rcar.h USB: host: Use the correct style for SPDX License Identifier 2020-04-16 14:32:46 +02:00
xhci-ring.c xhci: fix even more unsafe memory usage in xhci tracing 2024-07-05 19:07:34 +02:00
xhci-tegra.c xhci: tegra: Delay for disabling LFPS detector 2021-01-27 11:55:18 +01:00
xhci-trace.c
xhci-trace.h xhci: fix unsafe memory usage in xhci tracing 2024-07-05 19:07:34 +02:00
xhci.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xhci.h xhci: fix unsafe memory usage in xhci tracing 2024-07-05 19:07:34 +02:00