mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 00:43:08 -04:00
Merge tag 'phy-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-linus
Vinod writes: phy: fixes for 5.13 Phy driver fixes for few drivers: cadence, mtk-tphy, sparx5, wiz mostly fixing error code and checking return codes etc * tag 'phy-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable phy: ti: Fix an error code in wiz_probe() phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init() phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() phy: usb: Fix misuse of IS_ENABLED
This commit is contained in:
@@ -78,7 +78,7 @@ static inline u32 brcm_usb_readl(void __iomem *addr)
|
||||
* Other architectures (e.g., ARM) either do not support big endian, or
|
||||
* else leave I/O in little endian mode.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN))
|
||||
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
|
||||
return __raw_readl(addr);
|
||||
else
|
||||
return readl_relaxed(addr);
|
||||
@@ -87,7 +87,7 @@ static inline u32 brcm_usb_readl(void __iomem *addr)
|
||||
static inline void brcm_usb_writel(u32 val, void __iomem *addr)
|
||||
{
|
||||
/* See brcmnand_readl() comments */
|
||||
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN))
|
||||
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
|
||||
__raw_writel(val, addr);
|
||||
else
|
||||
writel_relaxed(val, addr);
|
||||
|
||||
@@ -940,6 +940,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
|
||||
sp->nsubnodes = node;
|
||||
|
||||
if (sp->num_lanes > SIERRA_MAX_LANES) {
|
||||
ret = -EINVAL;
|
||||
dev_err(dev, "Invalid lane configuration\n");
|
||||
goto put_child2;
|
||||
}
|
||||
|
||||
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
|
||||
break;
|
||||
default:
|
||||
dev_err(tphy->dev, "incompatible PHY type\n");
|
||||
clk_disable_unprepare(instance->ref_clk);
|
||||
clk_disable_unprepare(instance->da_ref_clk);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -2470,6 +2470,10 @@ static int sparx5_serdes_probe(struct platform_device *pdev)
|
||||
priv->coreclock = clock;
|
||||
|
||||
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!iores) {
|
||||
dev_err(priv->dev, "Invalid resource\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
iomem = devm_ioremap(priv->dev, iores->start, resource_size(iores));
|
||||
if (IS_ERR(iomem)) {
|
||||
dev_err(priv->dev, "Unable to get serdes registers: %s\n",
|
||||
|
||||
@@ -341,7 +341,7 @@ static struct platform_driver mt7621_pci_phy_driver = {
|
||||
.probe = mt7621_pci_phy_probe,
|
||||
.driver = {
|
||||
.name = "mt7621-pci-phy",
|
||||
.of_match_table = of_match_ptr(mt7621_pci_phy_ids),
|
||||
.of_match_table = mt7621_pci_phy_ids,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1212,6 +1212,7 @@ static int wiz_probe(struct platform_device *pdev)
|
||||
|
||||
if (wiz->typec_dir_delay < WIZ_TYPEC_DIR_DEBOUNCE_MIN ||
|
||||
wiz->typec_dir_delay > WIZ_TYPEC_DIR_DEBOUNCE_MAX) {
|
||||
ret = -EINVAL;
|
||||
dev_err(dev, "Invalid typec-dir-debounce property\n");
|
||||
goto err_addr_to_resource;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user