[PATCH 23/40] USB iowarrior.c: fix check-after-use
Greg Kroah-Hartman <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
From: Adrian Bunk <[email protected]> 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 <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/usb/misc/iowarrior.c | 2 +- 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; } -- 1.5.3.4 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel