[PATCH v5] pinctrl: stm32: Add check for clk_enable()
Marek Vasut
marex at denx.de
Sun Dec 15 15:41:43 PST 2024
On 12/15/24 9:40 PM, Mingwei Zheng wrote:
[...]
> @@ -1617,10 +1602,18 @@ int stm32_pctl_probe(struct platform_device *pdev)
> return -EINVAL;
> }
> pctl->banks = devm_kcalloc(dev, banks, sizeof(*pctl->banks),
> - GFP_KERNEL);
> + GFP_KERNEL);
Please drop this one change.
> if (!pctl->banks)
> return -ENOMEM;
>
> + pctl->clks = devm_kcalloc(dev, banks, sizeof(*pctl->clks),
> + GFP_KERNEL);
> + if (!pctl->clks)
> + return -ENOMEM;
> +
> + for (i = 0; i < banks; ++i)
> + pctl->clks[i].id = "";
Is this ^ assignment necessary ? If so, why ?
[...]
More information about the linux-arm-kernel
mailing list