Messages in this thread Patch in this message | | | Date | Thu, 18 Oct 2007 12:52:50 +0200 | From | Adrian Bunk <> | Subject | [2.6 patch] 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>
--- 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |