public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] driver core: use put_device() instead of kfree()
@ 2018-03-11  5:55 Arvind Yadav
  2018-03-11  5:55 ` [PATCH 1/4] base: soc: " Arvind Yadav
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arvind Yadav @ 2018-03-11  5:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-11  5:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-11  5:55 [PATCH 0/4] driver core: use put_device() instead of kfree() Arvind Yadav
2018-03-11  5:55 ` [PATCH 1/4] base: soc: " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox