From: Markus Armbruster Date: Thu, 10 Jan 2013 13:33:24 +0000 (+0100) Subject: usb-host: Drop superfluous null test from usb_host_auto_scan() X-Git-Url: https://repo.jachan.dev/qemu.git/commitdiff_plain/4663530898a15944706d51b523d1f1545e32e46a 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 Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index e8e6a42fb9..a498840e0a 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; }