diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-18 12:54:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-18 12:54:46 +0100 |
commit | af707f58d81cd2ec5ba973f8c3d76e66b4b632cf (patch) | |
tree | 22740aee9eea6914dad85bfa8c19d5555e7c979b | |
parent | 70d0ba4cf79a0e73485b22d955991c6f27257376 (diff) | |
parent | 827cb0323928952c0db9515aba9d534fb1285b3f (diff) |
Merge tag 'phy-for-5.0-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus
Kishon writes:
phy: for 5.0 -rc
*) Fix de-reference before null check in TI's phy-gmii-sel driver
*) Fix build breakage in AHCI platform driver (patch was merged in AHCI
before dependent patches were merged in PHY layer)
*) Fix the power on error path in ath79-usb PHY driver
*) Fix the reset binding name to match the DT binding documentation in
ath79-usb PHY driver.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
* tag 'phy-for-5.0-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy:
phy: ath79-usb: Fix the main reset name to match the DT binding
phy: ath79-usb: Fix the power on error path
phy: fix build breakage: add PHY_MODE_SATA
phy: ti: ensure priv is not null before dereferencing it
-rw-r--r-- | drivers/phy/qualcomm/phy-ath79-usb.c | 4 | ||||
-rw-r--r-- | drivers/phy/ti/phy-gmii-sel.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/phy/qualcomm/phy-ath79-usb.c b/drivers/phy/qualcomm/phy-ath79-usb.c index 6fd6e07ab345..09a77e556ece 100644 --- a/drivers/phy/qualcomm/phy-ath79-usb.c +++ b/drivers/phy/qualcomm/phy-ath79-usb.c @@ -31,7 +31,7 @@ static int ath79_usb_phy_power_on(struct phy *phy) err = reset_control_deassert(priv->reset); if (err && priv->no_suspend_override) - reset_control_assert(priv->no_suspend_override); + reset_control_deassert(priv->no_suspend_override); return err; } @@ -69,7 +69,7 @@ static int ath79_usb_phy_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - priv->reset = devm_reset_control_get(&pdev->dev, "usb-phy"); + priv->reset = devm_reset_control_get(&pdev->dev, "phy"); if (IS_ERR(priv->reset)) return PTR_ERR(priv->reset); diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index 77fdaa551977..a52c5bb35033 100644 --- a/drivers/phy/ti/phy-gmii-sel.c +++ b/drivers/phy/ti/phy-gmii-sel.c @@ -204,11 +204,11 @@ static struct phy *phy_gmii_sel_of_xlate(struct device *dev, if (args->args_count < 1) return ERR_PTR(-EINVAL); + if (!priv || !priv->if_phys) + return ERR_PTR(-ENODEV); if (priv->soc_data->features & BIT(PHY_GMII_SEL_RMII_IO_CLK_EN) && args->args_count < 2) return ERR_PTR(-EINVAL); - if (!priv || !priv->if_phys) - return ERR_PTR(-ENODEV); if (phy_id > priv->soc_data->num_ports) return ERR_PTR(-EINVAL); if (phy_id != priv->if_phys[phy_id - 1].id) |