From: "KAMBAROV, ZAUR" Later in this function we check for the nullness of p.qh. So either this additonal test is needed or the existing one is redundant. This defect was found automatically by Coverity Prevent, a static analysis tool. Signed-off-by: Zaur Kambarov Signed-off-by: Andrew Morton --- drivers/usb/host/ehci-dbg.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff -puN drivers/usb/host/ehci-dbg.c~coverity-usb-host-ehci-dbg-null-check drivers/usb/host/ehci-dbg.c --- devel/drivers/usb/host/ehci-dbg.c~coverity-usb-host-ehci-dbg-null-check 2005-06-30 23:06:17.000000000 -0700 +++ devel-akpm/drivers/usb/host/ehci-dbg.c 2005-06-30 23:06:17.000000000 -0700 @@ -523,14 +523,16 @@ show_periodic (struct class_device *clas do { switch (tag) { case Q_TYPE_QH: - temp = scnprintf (next, size, " qh%d-%04x/%p", - p.qh->period, - le32_to_cpup (&p.qh->hw_info2) - /* uframe masks */ - & 0xffff, - p.qh); - size -= temp; - next += temp; + if (p.qh) { + temp = scnprintf (next, size, " qh%d-%04x/%p", + p.qh->period, + le32_to_cpup (&p.qh->hw_info2) + /* uframe masks */ + & 0xffff, + p.qh); + size -= temp; + next += temp; + } /* don't repeat what follows this qh */ for (temp = 0; temp < seen_count; temp++) { if (seen [temp].ptr != p.ptr) _