From: Mike Isely Date: Mon, 11 Feb 2008 02:23:28 +0000 (-0600) Subject: USB: cypress_m8: Get rid of pointless NULL check X-Git-Tag: upstream/snapshot3+hdmi~26226^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6768306c3d9568bc66dc22f8b863bfbda3e7c4d2;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index f0c5d2a..bdeda09 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) 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);