* [2.6 patch] USB iowarrior.c: fix check-after-use
@ 2007-10-18 10:52 Adrian Bunk
2007-10-18 11:01 ` [linux-usb-devel] " Oliver Neukum
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-10-18 10:52 UTC (permalink / raw)
To: greg; +Cc: linux-usb-devel, linux-kernel
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>
---
82a9906788e8bedc6d5adc54046e1713e4a399df
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 46d9f27..9930b0a 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-18 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 10:52 [2.6 patch] USB iowarrior.c: fix check-after-use Adrian Bunk
2007-10-18 11:01 ` [linux-usb-devel] " Oliver Neukum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox