Messages in this thread | | | Date | Tue, 16 Jan 2018 00:02:09 +0100 | From | Wolfram Sang <> | Subject | Re: i2c: core: decrease reference count of device node in i2c_unregister_device |
| |
On Mon, Nov 27, 2017 at 03:06:55PM +0800, Lixin Wang wrote: > Reference count of device node was increased in of_i2c_register_device, > but without decreasing it in i2c_unregister_device. Then the dynamically > added device node will never be released. > Fix this by adding the of_node_put. > > Signed-off-by: Lixin Wang <alan.1.wang@nokia-sbell.com>
Yes you are right! In my previous review, I mixed up of_i2c_register_devices (with plural 's') with of_i2c_register_device (without plural 's'). I could now verify your findings by rebinding an adapter which had DT bindings for clients attached. With every rebind cycle, the refcount for the client increased.
I did some rebasing, because your patch didn't apply to a v4.15 codebase. Now, applied to for-current, thanks!
[unhandled content-type:application/pgp-signature] | |