summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2018-06-19 16:14:30 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-20 02:05:44 +0200
commit2aee167c3675b088c86f648f834e793a0085e04d (patch)
treec9ac3edeb7f6851bb1a0a639732f665acd0a02e5 /drivers
parentnet/sched: act_ife: preserve the action control in case of error (diff)
downloadlinux-2aee167c3675b088c86f648f834e793a0085e04d.tar.xz
linux-2aee167c3675b088c86f648f834e793a0085e04d.zip
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 <daniel.lezcano@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/cdc_ncm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index b0e8b9613054..1eaec648bd1f 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -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);