summaryrefslogtreecommitdiffstats
path: root/drivers/phy/sunplus
Commit message (Collapse)AuthorAgeFilesLines
* phy: usb: sunplus: Fix potential null-ptr-deref in sp_usb_phy_probe()Shang XiaoJing2023-01-121-0/+3
| | | | | | | | | | | | sp_usb_phy_probe() will call platform_get_resource_byname() that may fail and return NULL. devm_ioremap() will use usbphy->moon4_res_mem->start as input, which may causes null-ptr-deref. Check the ret value of platform_get_resource_byname() to avoid the null-ptr-deref. Fixes: 99d9ccd97385 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Link: https://lore.kernel.org/r/20221125021222.25687-1-shangxiaojing@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: sunplus: Fix an IS_ERR() vs NULL bug in sp_usb_phy_probePeng Wu2022-11-051-2/+2
| | | | | | | | | | The devm_ioremap() function returns NULL on error, it doesn't return error pointers. Fixes: 99d9ccd973852 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021") Signed-off-by: Peng Wu <wupeng58@huawei.com> Link: https://lore.kernel.org/r/20220911060053.123594-1-wupeng58@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: usb: sunplus: Fix return value check in update_disc_vol()Wei Yongjun2022-09-131-2/+2
| | | | | | | | | | | In case of error, the function nvmem_cell_read() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 99d9ccd97385 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20220909094709.1790970-1-weiyongjun@huaweicloud.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: usb: Add USB2.0 phy driver for Sunplus SP7021Vincent Shih2022-09-023-0/+310
Add USB2.0 phy driver for Sunplus SP7021 Signed-off-by: Vincent Shih <vincent.sunplus@gmail.com> Link: https://lore.kernel.org/r/1658717052-26142-2-git-send-email-vincent.sunplus@gmail.com [vkoul: remove trailing line in driver file] Signed-off-by: Vinod Koul <vkoul@kernel.org>