usb: host: remove unnecessary null check
Subsystems (2)
PATCH 1/1 usb: host: remove unnecessary null check
Remove unnecessary null check. udev->tt cannot ever be NULL when this section of code runs.
Addresses-Coverity-ID: 100828
Cc Alan Stern <[email protected]>
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-sched.c +1 -1
@@ -1105,7 +1105,7 @@ iso_stream_init( addr |= epnum <<8 ; addr |= dev->devnum; stream->ps.usecs =HS_USECS_ISO (maxp); - think_time = dev->tt ? dev->tt->think_time :0 ; + think_time = dev->tt->think_time; stream->ps.tt_usecs =NS_TO_US (think_time +usb_calc_bus_time ( dev->speed, is_input,1 , maxp)); hs_transfers =max (1u , (maxp +187 ) /188 );
Signature · 1 line
2.5.0
Quoted 15 lines · Gustavo A. R. Silva
Remove unnecessary null check.
udev->ttcannot ever be NULL when this section of code runs.Addresses-Coverity-ID: 100828
Cc Alan Stern <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/ehci-sched.c +0
-0
drivers/usb/host/ehci-sched.c iso_stream_init( · line 1111
Quoted 8 lines
drivers/usb/host/ehci-sched.c +1
-1@@ -1105,7 +1105,7 @@ iso_stream_init( addr |= epnum <<8 ; addr |= dev->devnum; stream->ps.usecs =HS_USECS_ISO (maxp); - think_time = dev->tt ? dev->tt->think_time :0 ; + think_time = dev->tt->think_time; stream->ps.tt_usecs =NS_TO_US (think_time +usb_calc_bus_time ( dev->speed, is_input,1 , maxp)); hs_transfers =max (1u , (maxp +187 ) /188 );
Acked-by Alan Stern <[email protected]>