aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-18 12:52:50 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-25 12:18:43 -0700
commite28c6a77061ab28bd2f0b57e400e3e58cd3474ca (patch)
tree256838abb4d5a6ebab61c8fd0eb4780540150933 /drivers/usb/misc
parent0b28baaf74ca04be2e0cc4d4dd2bbc801697f744 (diff)
downloadkernel_samsung_aries-e28c6a77061ab28bd2f0b57e400e3e58cd3474ca.zip
kernel_samsung_aries-e28c6a77061ab28bd2f0b57e400e3e58cd3474ca.tar.gz
kernel_samsung_aries-e28c6a77061ab28bd2f0b57e400e3e58cd3474ca.tar.bz2
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>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/iowarrior.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index d372fbc..c86c132 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -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;
}