platform/x86: amd-pmc: put device on error paths
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 04:50:05 +0000 (20:50 -0800)
committerHans de Goede <hdegoede@redhat.com>
Tue, 2 Feb 2021 18:33:44 +0000 (19:33 +0100)
commit745ed17a04f966406c8c27c8f992544336c06013
tree8a895e5e2f981e1e20f841327c11971dbbfa0f36
parenteabe533904cbcb6c7df530fd807cf2a3c3567d35
platform/x86: amd-pmc: put device on error paths

Put the PCI device rdev on error paths to fix potential reference count
leaks.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/20210121045005.73342-1-bianpan2016@163.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c