mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 13:25:20 +02:00
![]() [ Upstream commit d14402a38c2d868cacb1facaf9be908ca6558e59 ]
The qmp_usb_iomap() helper function currently returns the raw result of
devm_ioremap() for non-exclusive mappings. Since devm_ioremap() may return
a NULL pointer and the caller only checks error pointers with IS_ERR(),
NULL could bypass the check and lead to an invalid dereference.
Fix the issue by checking if devm_ioremap() returns NULL. When it does,
qmp_usb_iomap() now returns an error pointer via IOMEM_ERR_PTR(-ENOMEM),
ensuring safe and consistent error handling.
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Fixes:
|
||
---|---|---|
.. | ||
allwinner | ||
amlogic | ||
broadcom | ||
cadence | ||
freescale | ||
hisilicon | ||
ingenic | ||
intel | ||
lantiq | ||
marvell | ||
mediatek | ||
microchip | ||
motorola | ||
mscc | ||
qualcomm | ||
ralink | ||
renesas | ||
rockchip | ||
samsung | ||
socionext | ||
st | ||
starfive | ||
sunplus | ||
tegra | ||
ti | ||
xilinx | ||
Kconfig | ||
Makefile | ||
phy-can-transceiver.c | ||
phy-core-mipi-dphy.c | ||
phy-core.c | ||
phy-lgm-usb.c | ||
phy-lpc18xx-usb-otg.c | ||
phy-pistachio-usb.c | ||
phy-xgene.c |