error: Drop a few superfluous ERRP_GUARD()

include/qapi/error.h on ERRP_GUARD():

 * It must be used when the function dereferences @errp or passes
 * @errp to error_prepend(), error_vprepend(), or error_append_hint().
 * It is safe to use even when it's not needed, but please avoid
 * cluttering the source with useless code.

Clean up some of this clutter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221121085054.683122-3-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2022-11-21 09:50:46 +01:00
parent 6c37ebf330
commit 740d6c4eba
6 changed files with 0 additions and 8 deletions

View File

@ -522,7 +522,6 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
BlockCopyState **bcs,
Error **errp)
{
ERRP_GUARD();
BDRVCopyBeforeWriteState *state;
BlockDriverState *top;
QDict *opts;

View File

@ -357,7 +357,6 @@ static void write_elf32_notes(WriteCoreDumpFunction f, DumpState *s,
static void write_elf_phdr_note(DumpState *s, Error **errp)
{
ERRP_GUARD();
Elf32_Phdr phdr32;
Elf64_Phdr phdr64;
void *phdr;
@ -773,7 +772,6 @@ static void dump_iterate(DumpState *s, Error **errp)
static void dump_end(DumpState *s, Error **errp)
{
int rc;
ERRP_GUARD();
if (s->elf_section_data_size) {
s->elf_section_data = g_malloc0(s->elf_section_data_size);

View File

@ -493,8 +493,6 @@ void qdev_del_unplug_blocker(DeviceState *dev, Error *reason)
bool qdev_unplug_blocked(DeviceState *dev, Error **errp)
{
ERRP_GUARD();
if (dev->unplug_blockers) {
error_propagate(errp, error_copy(dev->unplug_blockers->data));
return true;

View File

@ -317,7 +317,6 @@ bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
void msi_set_mask(PCIDevice *dev, int vector, bool mask, Error **errp)
{
ERRP_GUARD();
uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
uint32_t irq_state, vector_mask, pending;

View File

@ -719,7 +719,6 @@ static void vfu_object_machine_done(Notifier *notifier, void *data)
*/
static void vfu_object_init_ctx(VfuObject *o, Error **errp)
{
ERRP_GUARD();
DeviceState *dev = NULL;
vfu_pci_type_t pci_type = VFU_PCI_TYPE_CONVENTIONAL;
int ret;

View File

@ -51,7 +51,6 @@ bool qemu_console_fill_device_address(QemuConsole *con,
size_t size,
Error **errp)
{
ERRP_GUARD();
DeviceState *dev = DEVICE(object_property_get_link(OBJECT(con),
"device",
&error_abort));