diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-07-13 05:53:48 +0000 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2020-08-05 18:43:01 +0200 |
commit | f1889c9066722f56428978ce9431a6cacabecb57 (patch) | |
tree | 11871a2f3bf54cab019bf24a6f2ff738ec1b7552 | |
parent | 2ab77a34d070b1611a52b50c7cfae074153d475b (diff) |
watchdog: pcwd_usb: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL usb_pcwd->intr_buffer and
this check is not required.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200713055348.21620-1-vulab@iscas.ac.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
-rw-r--r-- | drivers/watchdog/pcwd_usb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index 79efca47cebb..41a928eb91ed 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c @@ -585,9 +585,8 @@ static struct notifier_block usb_pcwd_notifier = { static inline void usb_pcwd_delete(struct usb_pcwd_private *usb_pcwd) { usb_free_urb(usb_pcwd->intr_urb); - if (usb_pcwd->intr_buffer != NULL) - usb_free_coherent(usb_pcwd->udev, usb_pcwd->intr_size, - usb_pcwd->intr_buffer, usb_pcwd->intr_dma); + usb_free_coherent(usb_pcwd->udev, usb_pcwd->intr_size, + usb_pcwd->intr_buffer, usb_pcwd->intr_dma); kfree(usb_pcwd); } |