rpmsg: glink: use put_device() if device_register fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 8 Mar 2018 09:36:07 +0000 (15:06 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 18 Mar 2018 04:45:57 +0000 (21:45 -0700)
commita9011726c4bb37e5d6a7279bf47fcc19cd9d3e1a
treef85ce090085c45c50f2c6f895a2f2c3861d98794
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2
rpmsg: glink: use put_device() if device_register fail

if device_register() returned an error! Always use put_device()
to give up the reference initialized. And unregister device for
other return error.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/qcom_glink_smem.c