mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
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: Adrian Bunk <bunk@stusta.de> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0b28baaf74
commit
e28c6a7706
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue