mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
cc8d2b65c7
commit
4663530898
1 changed files with 1 additions and 1 deletions
|
@ -1760,7 +1760,7 @@ static int usb_host_auto_scan(void *opaque, int bus_num,
|
||||||
if (f->addr > 0 && f->addr != addr) {
|
if (f->addr > 0 && f->addr != addr) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (f->port != NULL && (port == NULL || strcmp(f->port, port) != 0)) {
|
if (f->port != NULL && strcmp(f->port, port) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue