提交 2aee167c 编写于 作者: D Daniel Lezcano 提交者: David S. Miller

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: NDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cbf56c29
...@@ -967,7 +967,6 @@ void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf) ...@@ -967,7 +967,6 @@ void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)
atomic_set(&ctx->stop, 1); 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); tasklet_kill(&ctx->bh);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册