ChangeSet 1.1194, 2003/05/20 17:04:18-07:00, baldrick@wanadoo.fr [PATCH] USB speedtouch: remove useless NULL pointer checks The stats field is never NULL. diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c --- a/drivers/usb/misc/speedtch.c Tue May 20 17:24:10 2003 +++ b/drivers/usb/misc/speedtch.c Tue May 20 17:24:10 2003 @@ -366,8 +366,7 @@ /* is skb long enough ? */ if (skb->len < pdu_length) { - if (ctx->vcc->stats) - atomic_inc (&ctx->vcc->stats->rx_err); + atomic_inc (&ctx->vcc->stats->rx_err); return NULL; } @@ -386,8 +385,7 @@ /* check crc */ if (pdu_crc != crc) { dbg ("udsl_decode_aal5: crc check failed!"); - if (ctx->vcc->stats) - atomic_inc (&ctx->vcc->stats->rx_err); + atomic_inc (&ctx->vcc->stats->rx_err); return NULL; } @@ -395,8 +393,7 @@ skb_trim (skb, length); /* update stats */ - if (ctx->vcc->stats) - atomic_inc (&ctx->vcc->stats->rx); + atomic_inc (&ctx->vcc->stats->rx); dbg ("udsl_decode_aal5 returns pdu 0x%p with length %d", skb, skb->len); return skb; @@ -778,8 +775,7 @@ kfree_skb (skb); instance->current_skb = NULL; - if (vcc->stats) - atomic_inc (&vcc->stats->tx); + atomic_inc (&vcc->stats->tx); } goto made_progress;