Commit e28c6a77 authored by Adrian Bunk's avatar Adrian Bunk Committed by 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: default avatarAdrian Bunk <bunk@stusta.de>
Acked-by: default avatarOliver Neukum <oliver@neukum.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment