Re: [PATCH] interconnect: Add NULL check in exynos_generic_icc_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/03/2025 13:08, Henry Martin wrote:
> ---
>  drivers/interconnect/samsung/exynos.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/interconnect/samsung/exynos.c b/drivers/interconnect/samsung/exynos.c
> index 9e041365d909..3dccc84f72cf 100644
> --- a/drivers/interconnect/samsung/exynos.c
> +++ b/drivers/interconnect/samsung/exynos.c
> @@ -134,6 +134,8 @@ static int exynos_generic_icc_probe(struct platform_device *pdev)
>  	priv->node = icc_node;
>  	icc_node->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOFn",
>  					bus_dev->of_node);
> +	if (!icc_node->name)
> +		return -ENOMEM;

Ah, and this also leaks ICC node.

Don't create such patches in automated way, but really analyze the
entire code. You just looked at other persons' commit and decided to do
the same, but this is not correct.


Best regards,
Krzysztof




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux