提交 e28c6a77 编写于 作者: A Adrian Bunk 提交者: Greg Kroah-Hartman

USB iowarrior.c: fix check-after-use

The Coverity checker spotted that we have already oops'ed if "dev"
was NULL.

Since "dev" being NULL doesn't seem to be possible here this patch 
removes the NULL check.
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Acked-by: NOliver Neukum <oliver@neukum.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0b28baaf
......@@ -351,7 +351,7 @@ static ssize_t iowarrior_write(struct file *file,
mutex_lock(&dev->mutex);
/* verify that the device wasn't unplugged */
if (dev == NULL || !dev->present) {
if (!dev->present) {
retval = -ENODEV;
goto exit;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册