Commit 2e043a2e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'phy-fixes-5.18' of...

Merge tag 'phy-fixes-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-linus

Vinod writes:

phy: fixes for 5.18

Fixes for bunch of drivers:
 - TI fixes for runtime disable, missing of_node_put and error handling
 - Samsung fixes for device_put and of_node_put
 - Amlogic error path handling

* tag 'phy-fixes-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()
  phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
  phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
  phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
  phy: ti: tusb1210: Fix an error handling path in tusb1210_probe()
  phy: samsung: exynos5250-sata: fix missing device put in probe error paths
  phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
  phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
  phy: ti: tusb1210: Make tusb1210_chg_det_states static
parents e90d20c9 2c8045d4
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -414,19 +414,19 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)

	ret = clk_prepare_enable(priv->clk_ref);
	if (ret)
		goto err_disable_clk_ref;
		return ret;

	priv->reset = devm_reset_control_array_get_exclusive(dev);
	if (IS_ERR(priv->reset))
		return PTR_ERR(priv->reset);
	if (IS_ERR(priv->reset)) {
		ret = PTR_ERR(priv->reset);
		goto err_disable_clk_ref;
	}

	priv->phy = devm_phy_create(dev, np, &phy_g12a_usb3_pcie_ops);
	if (IS_ERR(priv->phy)) {
		ret = PTR_ERR(priv->phy);
		if (ret != -EPROBE_DEFER)
			dev_err(dev, "failed to create PHY\n");

		return ret;
		dev_err_probe(dev, ret, "failed to create PHY\n");
		goto err_disable_clk_ref;
	}

	phy_set_drvdata(priv->phy, priv);
@@ -434,8 +434,12 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)

	phy_provider = devm_of_phy_provider_register(dev,
						     phy_g12a_usb3_pcie_xlate);
	if (IS_ERR(phy_provider)) {
		ret = PTR_ERR(phy_provider);
		goto err_disable_clk_ref;
	}

	return PTR_ERR_OR_ZERO(phy_provider);
	return 0;

err_disable_clk_ref:
	clk_disable_unprepare(priv->clk_ref);
+2 −1
Original line number Diff line number Diff line
@@ -629,7 +629,8 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
cleanup:
	if (error < 0)
		phy_mdm6600_device_power_off(ddata);

	pm_runtime_disable(ddata->dev);
	pm_runtime_dont_use_autosuspend(ddata->dev);
	return error;
}

+15 −6
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
		return -EINVAL;

	sata_phy->client = of_find_i2c_device_by_node(node);
	of_node_put(node);
	if (!sata_phy->client)
		return -EPROBE_DEFER;

@@ -195,20 +196,21 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
	sata_phy->phyclk = devm_clk_get(dev, "sata_phyctrl");
	if (IS_ERR(sata_phy->phyclk)) {
		dev_err(dev, "failed to get clk for PHY\n");
		return PTR_ERR(sata_phy->phyclk);
		ret = PTR_ERR(sata_phy->phyclk);
		goto put_dev;
	}

	ret = clk_prepare_enable(sata_phy->phyclk);
	if (ret < 0) {
		dev_err(dev, "failed to enable source clk\n");
		return ret;
		goto put_dev;
	}

	sata_phy->phy = devm_phy_create(dev, NULL, &exynos_sata_phy_ops);
	if (IS_ERR(sata_phy->phy)) {
		clk_disable_unprepare(sata_phy->phyclk);
		dev_err(dev, "failed to create PHY\n");
		return PTR_ERR(sata_phy->phy);
		ret = PTR_ERR(sata_phy->phy);
		goto clk_disable;
	}

	phy_set_drvdata(sata_phy->phy, sata_phy);
@@ -216,11 +218,18 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
	phy_provider = devm_of_phy_provider_register(dev,
					of_phy_simple_xlate);
	if (IS_ERR(phy_provider)) {
		clk_disable_unprepare(sata_phy->phyclk);
		return PTR_ERR(phy_provider);
		ret = PTR_ERR(phy_provider);
		goto clk_disable;
	}

	return 0;

clk_disable:
	clk_disable_unprepare(sata_phy->phyclk);
put_dev:
	put_device(&sata_phy->client->dev);

	return ret;
}

static const struct of_device_id exynos_sata_phy_of_match[] = {
+1 −1
Original line number Diff line number Diff line
@@ -838,7 +838,7 @@ static int serdes_am654_probe(struct platform_device *pdev)

clk_err:
	of_clk_del_provider(node);

	pm_runtime_disable(dev);
	return ret;
}

+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
	return 0;

err1:
	clk_disable(phy->wkupclk);
	clk_disable_unprepare(phy->wkupclk);

err0:
	return ret;
Loading