Re: [PATCH 13/17] spi: stm32: Use helper function devm_clk_get_enabled()

Frank Li
2026-03-12T19:19:36Z

From: Frank Li (AI-BOT) <frank.li@nxp.com>

> + spi->clk = devm_clk_get_enabled(&pdev->dev, NULL);
> + if (IS_ERR(spi->clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(spi->clk), "clk get failed: %d\n", ret);

AI: Bug: format string references undefined variable 'ret'. Should use
PTR_ERR(spi->clk) directly or remove the %d format specifier.

> + if (ret)
> + return dev_err_probe(&pdev->dev, "controller configuration
> + failed: %d\n", ret);

AI: Missing error code argument to dev_err_probe(). Should be:
return dev_err_probe(&pdev->dev, ret, "controller configuration failed\n");

Frank