aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2007-07-16 11:50:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-19 20:46:04 -0400
commite94fa28f137813c2f6e05470b41bd8f3c5422a04 (patch)
treef905111f970cd1e971d5afc43dabe94afd87c2ed /drivers/usb
parent195af2cce5ff81c4609c7ba585b6698a7771cbfc (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/mos7720.c5
-rw-r--r--drivers/usb/serial/mos7840.c19
2 files changed, 0 insertions, 24 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 231b584f6d0f..01e811becec4 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -110,11 +110,6 @@ static void mos7720_interrupt_callback(struct urb *urb)
110 110
111 dbg("%s"," : Entering\n"); 111 dbg("%s"," : Entering\n");
112 112
113 if (!urb) {
114 dbg("%s","Invalid Pointer !!!!:\n");
115 return;
116 }
117
118 switch (status) { 113 switch (status) {
119 case 0: 114 case 0:
120 /* success */ 115 /* success */
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 37f41f576d3d..f76480f1455d 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -436,11 +436,6 @@ static void mos7840_control_callback(struct urb *urb)
436 int result = 0; 436 int result = 0;
437 int status = urb->status; 437 int status = urb->status;
438 438
439 if (!urb) {
440 dbg("%s", "Invalid Pointer !!!!:\n");
441 return;
442 }
443
444 mos7840_port = (struct moschip_port *)urb->context; 439 mos7840_port = (struct moschip_port *)urb->context;
445 440
446 switch (status) { 441 switch (status) {
@@ -525,10 +520,6 @@ static void mos7840_interrupt_callback(struct urb *urb)
525 int status = urb->status; 520 int status = urb->status;
526 521
527 dbg("%s", " : Entering\n"); 522 dbg("%s", " : Entering\n");
528 if (!urb) {
529 dbg("%s", "Invalid Pointer !!!!:\n");
530 return;
531 }
532 523
533 switch (status) { 524 switch (status) {
534 case 0: 525 case 0:
@@ -676,11 +667,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
676 struct tty_struct *tty; 667 struct tty_struct *tty;
677 int status = urb->status; 668 int status = urb->status;
678 669
679 if (!urb) {
680 dbg("%s", "Invalid Pointer !!!!:\n");
681 return;
682 }
683
684 if (status) { 670 if (status) {
685 dbg("nonzero read bulk status received: %d", status); 671 dbg("nonzero read bulk status received: %d", status);
686 return; 672 return;
@@ -753,11 +739,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
753 int status = urb->status; 739 int status = urb->status;
754 int i; 740 int i;
755 741
756 if (!urb) {
757 dbg("%s", "Invalid Pointer !!!!:\n");
758 return;
759 }
760
761 mos7840_port = (struct moschip_port *)urb->context; 742 mos7840_port = (struct moschip_port *)urb->context;
762 spin_lock(&mos7840_port->pool_lock); 743 spin_lock(&mos7840_port->pool_lock);
763 for (i = 0; i < NUM_URBS; i++) { 744 for (i = 0; i < NUM_URBS; i++) {