Commit fde9ec3c authored by Olof Johansson's avatar Olof Johansson

Merge tag 'reset-fixes-for-v5.16-2' of git://git.pengutronix.de/pza/linux into arm/fixes

Reset controller fixes for v5.16, part 2

Fix pm_runtime_resume_and_get() error handling in the
reset-rzg2l-usbphy-ctrl driver.

* tag 'reset-fixes-for-v5.16-2' of git://git.pengutronix.de/pza/linux:
  reset: renesas: Fix Runtime PM usage
  reset: tegra-bpmp: Revert Handle errors in BPMP response

Link: https://lore.kernel.org/r/20220105172515.273947-1-p.zabel@pengutronix.deSigned-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 7ad8b2fc 92c959ba
...@@ -137,7 +137,12 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) ...@@ -137,7 +137,12 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
dev_set_drvdata(dev, priv); dev_set_drvdata(dev, priv);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
pm_runtime_resume_and_get(&pdev->dev); error = pm_runtime_resume_and_get(&pdev->dev);
if (error < 0) {
pm_runtime_disable(&pdev->dev);
reset_control_assert(priv->rstc);
return dev_err_probe(&pdev->dev, error, "pm_runtime_resume_and_get failed");
}
/* put pll and phy into reset state */ /* put pll and phy into reset state */
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
......
...@@ -20,7 +20,6 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, ...@@ -20,7 +20,6 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc); struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
struct mrq_reset_request request; struct mrq_reset_request request;
struct tegra_bpmp_message msg; struct tegra_bpmp_message msg;
int err;
memset(&request, 0, sizeof(request)); memset(&request, 0, sizeof(request));
request.cmd = command; request.cmd = command;
...@@ -31,13 +30,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, ...@@ -31,13 +30,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
msg.tx.data = &request; msg.tx.data = &request;
msg.tx.size = sizeof(request); msg.tx.size = sizeof(request);
err = tegra_bpmp_transfer(bpmp, &msg); return tegra_bpmp_transfer(bpmp, &msg);
if (err)
return err;
if (msg.rx.ret)
return -EINVAL;
return 0;
} }
static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc, static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment