Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2aee167c authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller
Browse files

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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbf56c29
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -967,7 +967,6 @@ 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);

	tasklet_kill(&ctx->bh);