]> asedeno.scripts.mit.edu Git - linux.git/commit
driver core: node: use put_device() if device_register fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 11 Mar 2018 05:55:50 +0000 (11:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 13:37:04 +0000 (14:37 +0100)
commitc1cc0d51140fbcbb3c8cb08ee7e92020dda9c1af
tree29cf3bc2e24fc505ff4daf2331412df30d433db7
parentc8ae1674cd0d688661a8b85b8b2d940516933322
driver core: node: 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/node.c