USB: mos7720, mos7840: remove redundant urb check

Coverity (1709, 1710, 1711, 1712, 1713) actually flagged these as
REVERSE_INULLs (NULL check performed after dereference). But looking at
the other drivers I can't see any similar tests and the USB core already
makes sure urb is non-null - so might as well get rid of the checks.


Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Florin Malita 2007-07-16 11:50:53 -04:00 committed by Greg Kroah-Hartman
parent 195af2cce5
commit e94fa28f13
2 changed files with 0 additions and 24 deletions

View file

@ -110,11 +110,6 @@ static void mos7720_interrupt_callback(struct urb *urb)
dbg("%s"," : Entering\n"); dbg("%s"," : Entering\n");
if (!urb) {
dbg("%s","Invalid Pointer !!!!:\n");
return;
}
switch (status) { switch (status) {
case 0: case 0:
/* success */ /* success */

View file

@ -436,11 +436,6 @@ static void mos7840_control_callback(struct urb *urb)
int result = 0; int result = 0;
int status = urb->status; int status = urb->status;
if (!urb) {
dbg("%s", "Invalid Pointer !!!!:\n");
return;
}
mos7840_port = (struct moschip_port *)urb->context; mos7840_port = (struct moschip_port *)urb->context;
switch (status) { switch (status) {
@ -525,10 +520,6 @@ static void mos7840_interrupt_callback(struct urb *urb)
int status = urb->status; int status = urb->status;
dbg("%s", " : Entering\n"); dbg("%s", " : Entering\n");
if (!urb) {
dbg("%s", "Invalid Pointer !!!!:\n");
return;
}
switch (status) { switch (status) {
case 0: case 0:
@ -676,11 +667,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
struct tty_struct *tty; struct tty_struct *tty;
int status = urb->status; int status = urb->status;
if (!urb) {
dbg("%s", "Invalid Pointer !!!!:\n");
return;
}
if (status) { if (status) {
dbg("nonzero read bulk status received: %d", status); dbg("nonzero read bulk status received: %d", status);
return; return;
@ -753,11 +739,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
int status = urb->status; int status = urb->status;
int i; int i;
if (!urb) {
dbg("%s", "Invalid Pointer !!!!:\n");
return;
}
mos7840_port = (struct moschip_port *)urb->context; mos7840_port = (struct moschip_port *)urb->context;
spin_lock(&mos7840_port->pool_lock); spin_lock(&mos7840_port->pool_lock);
for (i = 0; i < NUM_URBS; i++) { for (i = 0; i < NUM_URBS; i++) {