[PATCH v2] i3c: dw: rename "pclk" to "apb" to match dt-binding
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Aug 13 21:36:10 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing error check for platform_get_irq() breaks probe deferral.
--
--- Patch [1]: [PATCH v2] i3c: dw: rename "pclk" to "apb" to match dt-binding ---
commit 342a3504d5ec0fb05c08b9de5076fc569bcdc43b
Author: Jisheng Zhang <jszhang at kernel.org>
i3c: dw: rename "pclk" to "apb" to match dt-binding
Change clock name "pclk" to "apb" to match dt-binding doc. No upstream
device tree sources currently use the "pclk" clock name, so no any
backward compatibility issues.
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 2f8c0c4683e06..0625587f15274 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1579,7 +1579,7 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
> if (IS_ERR(master->core_clk))
> return PTR_ERR(master->core_clk);
>
> - master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
> + master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "apb");
> if (IS_ERR(master->pclk))
> return PTR_ERR(master->pclk);
[ ... ]
> writel(INTR_ALL, master->regs + INTR_STATUS);
> irq = platform_get_irq(pdev, 0);
> ret = devm_request_irq(&pdev->dev, irq,
> dw_i3c_master_irq_handler, 0,
> dev_name(&pdev->dev), master);
[Severity: High]
This isn't a bug introduced by this patch, but is it possible for
platform_get_irq() to return a negative error code like -EPROBE_DEFER here?
If irq is negative, passing it to devm_request_irq() without validation
causes it to fail with -EINVAL, overriding the original -EPROBE_DEFER error
code. Could this break the probe deferral mechanism for dw_i3c_common_probe()
in drivers/i3c/master/dw-i3c-master.c by preventing it from retrying when the
IRQ controller is ready?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260814040345.23033-1-jszhang@kernel.org?part=1
More information about the linux-i3c
mailing list