public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] driver core: use put_device() instead of kfree()
Date: Sun, 11 Mar 2018 11:25:47 +0530	[thread overview]
Message-ID: <cover.1520747459.git.arvind.yadav.cs@gmail.com> (raw)

Never directly free @dev after calling device_register(), even
if it returned an error! Always use put_device() to give up the
reference initialized.

Arvind Yadav (4):
  [PATCH 1/4] base: soc: use put_device() instead of kfree()
  [PATCH 2/4] driver core: platform: use put_device() if device_register fail
  [PATCH 3/4] driver core: node: use put_device() if device_register fail
  [PATCH 4/4] driver core: cpu: use put_device() if device_register fail

 drivers/base/cpu.c      | 4 +++-
 drivers/base/node.c     | 4 +++-
 drivers/base/platform.c | 4 +++-
 drivers/base/soc.c      | 2 ++
 4 files changed, 11 insertions(+), 3 deletions(-)

-- 
2.7.4

             reply	other threads:[~2018-03-11  5:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11  5:55 Arvind Yadav [this message]
2018-03-11  5:55 ` [PATCH 1/4] base: soc: use put_device() instead of kfree() Arvind Yadav
2018-03-11  5:55 ` [PATCH 2/4] driver core: platform: use put_device() if device_register fail Arvind Yadav
2018-03-11  5:55 ` [PATCH 3/4] driver core: node: " Arvind Yadav
2018-03-11  5:55 ` [PATCH 4/4] driver core: cpu: " Arvind Yadav

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=cover.1520747459.git.arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=gregkh@linuxfoundation.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