From: Vladimir Oltean <olte...@gmail.com>
Date: Tue, 15 Sep 2020 21:22:26 +0300

> @@ -993,6 +993,8 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
>  
>       ocelot->ports = devm_kcalloc(&pdev->dev, ocelot->num_phys_ports,
>                                    sizeof(struct ocelot_port *), GFP_KERNEL);
> +     if (!ocelot->ports)
> +             return -ENOMEM;

This leaks the reference to OF node 'ports'.

Reply via email to