Centos-kernel-stream-9/drivers/phy
Desnes Nunes fd4edd4539 phy: Fix error handling in tegra_xusb_port_init
JIRA: https://issues.redhat.com/browse/RHEL-78839

commit b2ea5f49580c0762d17d80d8083cb89bc3acf74f
Author: Ma Ke <make24@iscas.ac.cn>
Date: Mon, 3 Mar 2025 15:27:39 +0800

  If device_add() fails, do not use device_unregister() for error
  handling. device_unregister() consists two functions: device_del() and
  put_device(). device_unregister() should only be called after
  device_add() succeeded because device_del() undoes what device_add()
  does if successful. Change device_unregister() to put_device() call
  before returning from the function.

  As comment of device_add() says, 'if device_add() succeeds, you should
  call device_del() when you want to get rid of it. If device_add() has
  not succeeded, use only put_device() to drop the reference count'.

  Found by code review.

  Cc: stable@vger.kernel.org
  Fixes: 53d2a715c2 ("phy: Add Tegra XUSB pad controller support")
  Signed-off-by: Ma Ke <make24@iscas.ac.cn>
  Acked-by: Thierry Reding <treding@nvidia.com>
  Link: https://lore.kernel.org/r/20250303072739.3874987-1-make24@iscas.ac.cn
  Signed-off-by: Vinod Koul <vkoul@kernel.org>

Signed-off-by: Desnes Nunes <desnesn@redhat.com>
2025-07-14 22:49:55 -03:00
..
allwinner
amlogic
broadcom
cadence
freescale phy: fsl-imx8mq-usb: add tca function driver for imx95 2025-07-14 22:49:48 -03:00
hisilicon
ingenic
intel
lantiq
marvell
mediatek
microchip
motorola
mscc
qualcomm
ralink
realtek
renesas
rockchip
samsung
socionext
st
tegra phy: Fix error handling in tegra_xusb_port_init 2025-07-14 22:49:55 -03:00
ti
xilinx
Kconfig
Makefile
phy-can-transceiver.c
phy-core-mipi-dphy.c
phy-core.c phy: core: Remove unused phy_pm_runtime_(allow|forbid) 2025-07-14 22:49:51 -03:00
phy-lgm-usb.c
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c