qom: push permission checks up into qdev_property_add_legacy
commite3cb6ba65d265f2cc1313ee26e879407ff24663c
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 18 Dec 2011 16:05:06 +0000 (18 17:05 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 19 Dec 2011 16:27:33 +0000 (19 10:27 -0600)
treeabdafc651bed08dddfe08dab94a54c10cad2b6ba
parent0d41d9aabbed72750ca41e94ce1fda94dd1919d1
qom: push permission checks up into qdev_property_add_legacy

qdev_property_get and qdev_property_set can generate permission
denied errors themselves.  Do not duplicate this functionality in
qdev_get/set_legacy_property, and clean up excessive indentation.

Reviewed-by: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c