aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-02-10 21:23:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:37 -0400
commit6768306c3d9568bc66dc22f8b863bfbda3e7c4d2 (patch)
tree444aff0f1cd9c70139fe3cbed1e49a60f662332b /drivers/usb/serial
parent3d6aa3206540e1e68bda9e8ea11ec71444f1ac71 (diff)
USB: cypress_m8: Get rid of pointless NULL check
Remove a NULL check in cypress_m8; the check is useless in this context because it is referenced earlier in the same code path thus the kernel would be oops'ed before reaching this point anyway. (And it's really pointless here anyway; if this pointer somehow is NULL the driver is going to have serious problems in many other places.) Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/cypress_m8.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index f0c5d2a7ab9..bdeda093695 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1399,13 +1399,11 @@ static void cypress_read_int_callback(struct urb *urb)
1399 1399
1400 spin_lock_irqsave(&priv->lock, flags); 1400 spin_lock_irqsave(&priv->lock, flags);
1401 /* check to see if status has changed */ 1401 /* check to see if status has changed */
1402 if (priv != NULL) { 1402 if (priv->current_status != priv->prev_status) {
1403 if (priv->current_status != priv->prev_status) { 1403 priv->diff_status |= priv->current_status ^
1404 priv->diff_status |= priv->current_status ^ 1404 priv->prev_status;
1405 priv->prev_status; 1405 wake_up_interruptible(&priv->delta_msr_wait);
1406 wake_up_interruptible(&priv->delta_msr_wait); 1406 priv->prev_status = priv->current_status;
1407 priv->prev_status = priv->current_status;
1408 }
1409 } 1407 }
1410 spin_unlock_irqrestore(&priv->lock, flags); 1408 spin_unlock_irqrestore(&priv->lock, flags);
1411 1409