浏览代码

USB: ehci-dbg.c: no need for checking it before call vfree

vfree() does it's own NULL checking,so no need for check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Figo.zhang 16 年之前
父节点
当前提交
f8086a07c4
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/usb/host/ehci-dbg.c

+ 1 - 2
drivers/usb/host/ehci-dbg.c

@@ -879,8 +879,7 @@ static int debug_close(struct inode *inode, struct file *file)
 	struct debug_buffer *buf = file->private_data;
 
 	if (buf) {
-		if (buf->output_buf)
-			vfree(buf->output_buf);
+		vfree(buf->output_buf);
 		kfree(buf);
 	}