mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qdev: Make error_set_from_qdev_prop_error() get Object* argument
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> #s390 parts Message-Id: <20201211220529.2290218-13-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
381481597c
commit
c7525b183c
4 changed files with 12 additions and 12 deletions
|
@ -2390,7 +2390,7 @@ static void set_css_devid(Object *obj, Visitor *v, const char *name,
|
|||
|
||||
num = sscanf(str, "%2x.%1x%n.%4x%n", &cssid, &ssid, &n1, &devid, &n2);
|
||||
if (num != 3 || (n2 - n1) != 5 || strlen(str) != n2) {
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, dev, prop, str);
|
||||
error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
||||
goto out;
|
||||
}
|
||||
if ((cssid > MAX_CSSID) || (ssid > MAX_SSID)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue