rpmsg: smd: use put_device() if device_register fail
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 8 Mar 2018 09:36:08 +0000 (15:06 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 18 Mar 2018 04:46:19 +0000 (21:46 -0700)
commitbe5acd246daa04edad9d758b8be37e5e2f989243
tree61d18172da5c4144e22bcc2ae3d2002d779119a8
parenta9011726c4bb37e5d6a7279bf47fcc19cd9d3e1a
rpmsg: smd: use put_device() if device_register fail

if device_register() returned an error! Always use put_device()
to give up the reference initialized. 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_smd.c