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 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmC56nIACgkQfBQHDyUj g0d+xhAAmIR4LH6JcyULxcS06oqh4l0w+ptLYhHBuMrgHkF23NslqppaZ22Wg/Vv tnUS0B36FA2E8DkoNsDSnDDsCqM87pH6G1tq90T4uv63WhdOvOlSyU8YwcVmYTje cJ9yG2d267fTjLn5tSx+2PbaS0TIjdzSkQMIiri6Aws/22KdGTCrBe/uuQOHqFBv BzUxOYQQKZFRglP22mCE5fcWEZ2qB0q8uZp5GWMz9b49OMdlZoTxtVITTAV0Yz9V 17oP0QD53azXMqHIaEysLHnIxck+52cm1FjB3GtcFcGAdfC2JeepOvPPWVOCkRHB bFxedsFXovcEF32yrbc+CtHPnbg/bpVilU3TWLZPUSlrdBZL6osuhhMK7+dkeEdf ZfdjWbnKesxFMQ+rc3Dq6SgcONKVYJRSI0K+QVtVk+VAVZei4AT7eVJuwZq8yv6k 1BD4wiHNzLufavVjEzo3FdbAKHzg4MZzLt4WYM+IptIiIMNIvB65twF9PwcY068I AbfRNraatLjVvIRSRK9rJNsN1+XTTvkeiFt8op0N//QmbJhRbcvrNMt5/cfz7XhN 4fYgZLdd3k4RSZNGFZl4kp0Tv7CWm4yWSj62Cjs4kaEl0YVSxx3uS260fcDNOIAp fNZlV232syFUA8PRJxfbERbTn0rWPvpRAQAszpEYDgb8JWFncoU= =14qN -----END PGP SIGNATURE----- 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:
commit
757d2e6065
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user