Re: [PATCHv2 3/4] EDAC/altera: Fix code leak on dci allocation failure

Rounak Das <[email protected]>
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.linux-kernel
Message-ID <CAPYTKoPpccGRmu60qhzxUy7MAoH40z3B=ioUN4qCSFFmPakWmQ@mail.gmail.com>
Hi Dinh,

> -       if (!devres_open_group(device->edac->dev, altr_portb_setup, GFP_KERNEL))
> +       if (!devres_open_group(device->edac->dev, altr_portb_setup, GFP_KERNEL)) {
> +               edac_device_free_ctl_info(dci);
>                 return -ENOMEM;
> +       }

This overlaps with my of_node_put fix that was acked on 2026-07-20
([email protected]), which was held
until the sashiko issues were addressed.

Patches 3/4 and 4/4 touch the same two hunks in altr_portb_setup(): the
devres_open_group() failure path and the err_release_group_1 label. Both
changes are needed in the first one, i.e.

    if (!devres_open_group(...)) {
        edac_device_free_ctl_info(dci);
        of_node_put(np);
        return -ENOMEM;
    }

so whichever goes in second will need a rebase. Happy to resend mine on
top of this series if that ordering is easier.

Thanks,
Rounak
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.