Re: [PATCH 2/8] PCI: brcmstb: Use "clk_out" error path label

From: Markus Elfring
Date: Wed Jul 03 2024 - 14:46:25 EST


> [-- Attachment #1: Type: text/plain, Size: 1600 bytes --]

Can improved adjustments be provided as regular diff data (without an extra attachment)?


> Instead of invoking "clk_disable_unprepare(pcie->clk)" in
> a number of error paths.

* Can a wording approach (like the following) be a better change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc6#n45

Add a jump target so that a bit of exception handling can be better reused
at the end of this function implementation.

* How do you think about to use a summary phrase like
“Use more common error handling code in brcm_pcie_probe()”?




> +++ b/drivers/pci/controller/pcie-brcmstb.c

> ret = reset_control_reset(pcie->rescal);
> - if (ret)
> + if (ret) {
> dev_err(&pdev->dev, "failed to deassert 'rescal'\n");
> + goto clk_out;
> + }
>
> ret = brcm_phy_start(pcie);


Does this software update complete the exception handling?

Would you like to add any tags (like “Fixes” and “Cc”) accordingly?



> @@ -1676,6 +1677,9 @@ static int brcm_pcie_probe(struct platform_device *pdev)
>
> return 0;
>
> +clk_out:
> + clk_disable_unprepare(pcie->clk);
> + return ret;
> fail:


I suggest to add a blank line before the second label.

Regards,
Markus