ssb: use put_device() if device_register fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 8 Mar 2018 06:23:24 +0000 (11:53 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 13 Mar 2018 16:48:29 +0000 (18:48 +0200)
commita24853aab59184ebd19c5e078c7b29e1c316e3a1
tree4adce983a40d50df07b65b05bf70ed63fa71fc15
parent79ca239a68f8f006ed872a023d97fbadf9d1577d
ssb: use put_device() if device_register fail

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: Kalle Valo <kvalo@codeaurora.org>
drivers/ssb/main.c