Subject: Re: [RFC/PATCH 4/4] Add support for MSI on Axon-based Cell systems

From: Segher Boessenkool <[email-masked]>
Date: Fri, 8 Jun 2007 22:06:02 +0200

>> That wasn't my question though?
>
> Sorry, I misread this. The of_node_get is done because we keep
> a reference to the device node in the axon_msic struct. There is
> no module_exit function in the driver that could clean up the
> axon_msic, so we must never have an of_node_put as far as I
> understand.

>>>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if =
(axon_msi_setup_one(of_node_get(node)) =3D=3D 0)
>>>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 found++;

What if axon_msi_setup_one() returns an error?  Sounds
to me like the get() should be inside that function no
matter what?

If the reference counting isn't obvious, it is obviously
wrong ;-)

Segher