android_kernel_motorola_sm6375/drivers/phy
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Colin Ian King 1d08f59081 phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked
[ Upstream commit 38b1927e5bf9bcad4a2e33189ef1c5569f9599ba ]

Currently pointer phy0 is being dereferenced via the assignment of
phy on the call to phy_get_drvdata before phy0 is null checked, this
can lead to a null pointer dereference. Fix this by performing the
null check on phy0 before the call to phy_get_drvdata. Also replace
the phy0 == NULL check with the more usual !phy0 idiom.

Addresses-Coverity: ("Dereference before null check")
Fixes: e6f32efb1b ("phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200625124428.83564-1-colin.king@canonical.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:33:01 +02:00
..
allwinner phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked 2020-07-22 09:33:01 +02:00
amlogic
broadcom drivers: phy: sr-usb: do not use internal fsm for USB2 phy init 2020-06-24 17:50:28 +02:00
cadence
freescale
hisilicon
lantiq
marvell
mediatek
motorola phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval 2020-03-12 13:00:27 +01:00
mscc
qualcomm phy: qualcomm: Adjust indentation in read_poll_timeout 2020-02-11 04:35:45 -08:00
ralink
renesas
rockchip
samsung
socionext phy: uniphier-usb3ss: Add Pro5 support 2020-04-23 10:36:33 +02:00
st
tegra
ti phy: ti: gmii-sel: do not fail in case of gmii 2020-03-25 08:25:42 +01:00
Kconfig
Makefile
phy-core-mipi-dphy.c
phy-core.c
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c