net/usb/drivers: Remove useless hrtimer_active check
Subsystems (5)
PATCH 1/1 net/usb/drivers: Remove useless hrtimer_active check
The code does:
if (hrtimer_active(&t))
hrtimer_cancel(&t);
However, hrtimer_cancel() checks if the timer is active, so the test above is pointless.
Signed-off-by Daniel Lezcano <[email protected]>
--- drivers/net/usb/cdc_ncm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/usb/cdc_ncm.c +1 -2
@@ -967,8 +967,7 @@ void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)atomic_set (&ctx->stop,1 ); -if (hrtimer_active (&ctx->tx_timer)) -hrtimer_cancel (&ctx->tx_timer); +hrtimer_cancel (&ctx->tx_timer);tasklet_kill (&ctx->bh);
David Miller
maintainerFrom: Daniel Lezcano <[email protected]>
Date: Tue, 19 Jun 2018 16:14:30 +0200
Quoted 9 lines
The code does:
if (
hrtimer_active(&t))hrtimer_cancel(&t);However,
hrtimer_cancel()checks if the timer is active, so the test above is pointless.Signed-off-by Daniel Lezcano <[email protected]>
Applied.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html