diff options
author | Michael S. Tsirkin | 2011-05-05 15:39:47 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2011-05-05 15:39:47 +0200 |
commit | 5300f1a5487f67f0bde8ee1081b799108668cb1d (patch) | |
tree | 5274ff496f2665487736a4eec23bf76601e4da44 /hw/qdev-properties.c | |
parent | CPUPhysMemoryClient: Pass guest physical address not region offset (diff) | |
parent | NBD: Avoid leaking a couple of strings when the NBD device is closed (diff) | |
download | qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.tar.gz qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.tar.xz qemu-5300f1a5487f67f0bde8ee1081b799108668cb1d.zip |
Merge remote branch 'origin/master' into pci
Conflicts:
exec.c
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r-- | hw/qdev-properties.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 1088a26f8e..eff2d24945 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -354,10 +354,10 @@ static int parse_chr(DeviceState *dev, Property *prop, const char *str) if (*ptr == NULL) { return -ENOENT; } - if ((*ptr)->assigned) { + if ((*ptr)->avail_connections < 1) { return -EEXIST; } - (*ptr)->assigned = 1; + --(*ptr)->avail_connections; return 0; } |