cypress_m8: Get rid of pointless NULL check
From: Mike Isely <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
---
cypress_m8.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff -uprN -X linux-2.6.23.12-vanilla/Documentation/dontdiff
cypress_patch_03_get_config/drivers/usb/serial/cypress_m8.c
cypress_patch_04_null_check/drivers/usb/serial/cypress_m8.c
--- cypress_patch_03_get_config/drivers/usb/serial/cypress_m8.c 2008-02-10
19:37:31.000000000 -0600
+++ cypress_patch_04_null_check/drivers/usb/serial/cypress_m8.c 2008-02-10
19:37:47.000000000 -0600
@@ -1381,13 +1381,11 @@ static void cypress_read_int_callback(st
spin_lock_irqsave(&priv->lock, flags);
/* check to see if status has changed */
- if (priv != NULL) {
- if (priv->current_status != priv->prev_status) {
- priv->diff_status |= priv->current_status ^
- priv->prev_status;
- wake_up_interruptible(&priv->delta_msr_wait);
- priv->prev_status = priv->current_status;
- }
+ if (priv->current_status != priv->prev_status) {
+ priv->diff_status |= priv->current_status ^
+ priv->prev_status;
+ wake_up_interruptible(&priv->delta_msr_wait);
+ priv->prev_status = priv->current_status;
}
spin_unlock_irqrestore(&priv->lock, flags);
--
| Mike Isely | PGP fingerprint
Spammers Die!! | | 03 54 43 4D 75 E5 CC 92
| isely @ pobox (dot) com | 71 16 01 E2 B5 F5 C1 E8
| |
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html