]> asedeno.scripts.mit.edu Git - linux.git/commit
driver core: platform: use put_device() if device_register fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 11 Mar 2018 05:55:49 +0000 (11:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 13:37:04 +0000 (14:37 +0100)
commitc8ae1674cd0d688661a8b85b8b2d940516933322
treeb663b1e6fe1085a0eed8303920537234fec895a4
parentef49ec1dc35112b17f7e928aa08fcab60240bf1d
driver core: platform: use put_device() if device_register fail

if device_register() 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c