diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-10 14:33:24 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-01-14 12:47:11 +0100 |
commit | 4663530898a15944706d51b523d1f1545e32e46a (patch) | |
tree | 00c5818599218b42817907321562de725041d45f /hw/usb | |
parent | cc8d2b65c7e5f44172bf3ec300407522162e9a7f (diff) | |
download | hqemu-4663530898a15944706d51b523d1f1545e32e46a.zip hqemu-4663530898a15944706d51b523d1f1545e32e46a.tar.gz |
usb-host: Drop superfluous null test from usb_host_auto_scan()
Coverity points out that port is later passed to usb_host_open(),
which dereferences it. It actually can't be null: it always points to
usb_host_scan()'s auto port[]. Drop the superfluous port == NULL
test.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/host-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index e8e6a42..a498840 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1760,7 +1760,7 @@ static int usb_host_auto_scan(void *opaque, int bus_num, if (f->addr > 0 && f->addr != addr) { continue; } - if (f->port != NULL && (port == NULL || strcmp(f->port, port) != 0)) { + if (f->port != NULL && strcmp(f->port, port) != 0) { continue; } |