coresight: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 9 May 2018 18:06:03 +0000 (12:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 14:19:59 +0000 (16:19 +0200)
commita7082daac85231ddbb0502d777455756e4e3e69d
treef53eaaac7f63dcc4f4bb61bdd17fc50a5a5bbc71
parenta93e7b331568227500186a465fee3c2cb5dffd1f
coresight: use put_device() instead of kfree()

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

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight.c