提交 06dde506 编写于 作者: I Ilia Mirkin 提交者: Greg Kroah-Hartman

staging: usbip: Remove NULL check before kfree

This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: NIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 9f7ff701
......@@ -264,11 +264,9 @@ void stub_device_cleanup_urbs(struct stub_device *sdev)
kmem_cache_free(stub_priv_cache, priv);
if (urb->transfer_buffer != NULL)
kfree(urb->transfer_buffer);
kfree(urb->transfer_buffer);
if (urb->setup_packet != NULL)
kfree(urb->setup_packet);
kfree(urb->setup_packet);
usb_free_urb(urb);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册