OSDN Git Service

w1: use put_device() if device_register() fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 6 Mar 2018 10:24:06 +0000 (15:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Mar 2018 13:58:50 +0000 (14:58 +0100)
commit0ec4eb71b4956548a9c652f6c26232995916008c
tree08ec4a6661b9890d8e030ee03a67e057cc197f6d
parentaeef9c09740691e33aceeaa5f5b8a4457a4eab97
w1: use put_device() if device_register() fail

If device_register() returned an error! Always use put_device()
to give up the reference initialized in device_register().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/w1.c