mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	linux-renesas-soc@vger.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH v3] irqchip/renesas-rzg2l: Fix missing put_device
Date: Thu, 10 Oct 2024 20:18:16 +0200	[thread overview]
Message-ID: <fb7b687e-cca7-4888-8041-bdace6946a37@web.de> (raw)
In-Reply-To: <CAMuHMdWURj8YzXKbt74KqgEX5fc1ivg_4ctMxUy3QdJGipLuZA@mail.gmail.com>

>>> rzg2l_irqc_common_init calls of_find_device_by_node, but the
>>> corresponding put_device call is missing.
>>>
>>> Make sure we call put_device when failing.
>>>
>>> "make coccicheck" will complain about a missing put_device before
>>> successfully returning from rzg2l_irqc_common_init, however, that's
>>> a false positive.
>>>
>>> Fixes: 3fed09559cd8 ("irqchip: Add RZ/G2L IA55 Interrupt Controller driver")
>>
>> Might the application of scope-based resource management become more
>> interesting accordingly?
>
> No, as explained in the comments:
>
>>> +       /*
>>> +        * coccicheck complains about a missing put_device call before returning, but it's a false
>>> +        * positive. We still need &pdev->dev after successfully returning from this function.
>>> +        */

Please reconsider the applicability of mentioned programming interfaces once more
(as an evolving software design alternative for goto chains).
https://elixir.bootlin.com/linux/v6.12-rc2/source/include/linux/device.h#L1239

Regards,
Markus

  reply	other threads:[~2024-10-10 18:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 16:41 Fabrizio Castro
2024-10-10 17:53 ` Markus Elfring
2024-10-10 17:57   ` Geert Uytterhoeven
2024-10-10 18:18     ` Markus Elfring [this message]
2024-10-11 13:59       ` Fabrizio Castro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb7b687e-cca7-4888-8041-bdace6946a37@web.de \
    --to=markus.elfring@web.de \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®