OSDN Git Service

acpi/pcihp.c: Rewrite acpi_pcihp_get_bsel using object_property_get_int
authorKirill Batuzov <batuzovk@ispras.ru>
Thu, 24 Apr 2014 14:15:56 +0000 (18:15 +0400)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 7 May 2014 09:13:42 +0000 (12:13 +0300)
commit7c38ecd09763107513bacc791856fdbb582a107c
tree9688dde552fbf182ef80bf5d7ac5937774dd6a47
parent9898370497da3f18e0c9555b65c858eabc78ab50
acpi/pcihp.c: Rewrite acpi_pcihp_get_bsel using object_property_get_int

acpi_pcihp_get_bsel implements functionality of object_property_get_int for
specific property named ACPI_PCIHP_PROP_BSEL, but fails to decrement object's
reference counter properly. Rewriting it using generic object_property_get_int
serves two purposes: reducing code duplication and fixing memory leak.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/pcihp.c