aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/cryptodev.c2
-rw-r--r--backends/hostmem.c2
-rw-r--r--include/qom/object_interfaces.h5
-rw-r--r--qom/object_interfaces.c6
4 files changed, 7 insertions, 8 deletions
diff --git a/backends/cryptodev.c b/backends/cryptodev.c
index 1764c179fe..67edfa5328 100644
--- a/backends/cryptodev.c
+++ b/backends/cryptodev.c
@@ -215,7 +215,7 @@ bool cryptodev_backend_is_ready(CryptoDevBackend *backend)
}
static bool
-cryptodev_backend_can_be_deleted(UserCreatable *uc, Error **errp)
+cryptodev_backend_can_be_deleted(UserCreatable *uc)
{
return !cryptodev_backend_is_used(CRYPTODEV_BACKEND(uc));
}
diff --git a/backends/hostmem.c b/backends/hostmem.c
index 4606b73849..34550b9067 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -342,7 +342,7 @@ out:
}
static bool
-host_memory_backend_can_be_deleted(UserCreatable *uc, Error **errp)
+host_memory_backend_can_be_deleted(UserCreatable *uc)
{
if (host_memory_backend_is_mapped(MEMORY_BACKEND(uc))) {
return false;
diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h
index fdd7603c84..d63c1c28f8 100644
--- a/include/qom/object_interfaces.h
+++ b/include/qom/object_interfaces.h
@@ -51,7 +51,7 @@ typedef struct UserCreatableClass {
/* <public> */
void (*complete)(UserCreatable *uc, Error **errp);
- bool (*can_be_deleted)(UserCreatable *uc, Error **errp);
+ bool (*can_be_deleted)(UserCreatable *uc);
} UserCreatableClass;
/**
@@ -68,12 +68,11 @@ void user_creatable_complete(Object *obj, Error **errp);
/**
* user_creatable_can_be_deleted:
* @uc: the object whose can_be_deleted() method is called if implemented
- * @errp: if an error occurs, a pointer to an area to store the error
*
* Wrapper to call can_be_deleted() method if one of types it's inherited
* from implements USER_CREATABLE interface.
*/
-bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp);
+bool user_creatable_can_be_deleted(UserCreatable *uc);
/**
* user_creatable_add_type:
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index ff27e0669e..3bb8959f09 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -23,13 +23,13 @@ void user_creatable_complete(Object *obj, Error **errp)
}
}
-bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp)
+bool user_creatable_can_be_deleted(UserCreatable *uc)
{
UserCreatableClass *ucc = USER_CREATABLE_GET_CLASS(uc);
if (ucc->can_be_deleted) {
- return ucc->can_be_deleted(uc, errp);
+ return ucc->can_be_deleted(uc);
} else {
return true;
}
@@ -178,7 +178,7 @@ void user_creatable_del(const char *id, Error **errp)
return;
}
- if (!user_creatable_can_be_deleted(USER_CREATABLE(obj), errp)) {
+ if (!user_creatable_can_be_deleted(USER_CREATABLE(obj))) {
error_setg(errp, "object '%s' is in use, can not be deleted", id);
return;
}