mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Lixin Wang <alan.1.wang@nokia-sbell.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: i2c: core: decrease reference count of device node in i2c_unregister_device
Date: Tue, 16 Jan 2018 00:02:09 +0100	[thread overview]
Message-ID: <20180115230209.6atseekh5r7a2zd6@ninjato> (raw)
In-Reply-To: <1511766415-3732-1-git-send-email-alan.1.wang@nokia-sbell.com>

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

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!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2018-01-15 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27  7:06 [PATCH] " Lixin Wang
2017-11-27 18:21 ` Wolfram Sang
2017-11-29  8:06   ` Wang, Alan 1. (NSB - CN/Hangzhou)
2018-01-15 23:02 ` Wolfram Sang [this message]

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=20180115230209.6atseekh5r7a2zd6@ninjato \
    --to=wsa@the-dreams.de \
    --cc=alan.1.wang@nokia-sbell.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®