Skip to content

Commit

Permalink
Merge tag 'reset-fixes-for-v5.16-2' of git://git.pengutronix.de/pza/l…
Browse files Browse the repository at this point in the history
…inux 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/[email protected]
Signed-off-by: Olof Johansson <[email protected]>
  • Loading branch information
olofj committed Jan 6, 2022
2 parents 7ad8b2f + 92c959b commit fde9ec3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 6 additions & 1 deletion drivers/reset/reset-rzg2l-usbphy-ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
dev_set_drvdata(dev, priv);

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 */
spin_lock_irqsave(&priv->lock, flags);
Expand Down
9 changes: 1 addition & 8 deletions drivers/reset/tegra/reset-bpmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
struct mrq_reset_request request;
struct tegra_bpmp_message msg;
int err;

memset(&request, 0, sizeof(request));
request.cmd = command;
Expand All @@ -31,13 +30,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
msg.tx.data = &request;
msg.tx.size = sizeof(request);

err = tegra_bpmp_transfer(bpmp, &msg);
if (err)
return err;
if (msg.rx.ret)
return -EINVAL;

return 0;
return tegra_bpmp_transfer(bpmp, &msg);
}

static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
Expand Down

0 comments on commit fde9ec3

Please sign in to comment.