Commit 46635308 authored by Markus Armbruster's avatar Markus Armbruster Committed by Gerd Hoffmann
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent cc8d2b65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
        }