[PATCH -next] mtd: rawnand: intel: Add missing of_node_put() in ebu_nand_probe()
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Tue Sep 27 12:26:07 PDT 2022
Hi,
On Mon, Sep 26, 2022 at 3:58 AM Yang Yingliang <yangyingliang at huawei.com> wrote:
[...]
> >> +err_of_node_put:
> >> + of_node_put(chip_np);
> > Here I have one question:
> > My understanding is that with this patch we now use
> > of_node_put(chip_np); in case any error occurs during probe.
> > But what about the case where there's no error and someone later
> > unloads the driver (using rmmod)? Or in other words: do we need
> > another of_node_put() call in ebu_nand_remove()?
> In normal case, when the module is removing, the of_node_put() is
> called in del_mtd_device() which is called by mtd_device_unregister().
Thank you so much for the explanation! With this your patch gets my:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Best regards,
Martin
More information about the linux-mtd
mailing list