Could someone comment on this please?
From: "KAMBAROV, ZAUR" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- 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) _ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel