diff options
| author | Duncan Sands <baldrick@wanadoo.fr> | 2003-05-20 03:04:18 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-05-20 03:04:18 -0700 |
| commit | 2aea7c0010bad316bd1effb9b5679ad5dedb7146 (patch) | |
| tree | 242330382e411c80ff462dc98d581bd7d58d489e | |
| parent | 3dfedcfecaaf9fcad14c6daaedf4da093fa30cc4 (diff) | |
[PATCH] USB speedtouch: remove useless NULL pointer checks
The stats field is never NULL.
| -rw-r--r-- | drivers/usb/misc/speedtch.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c index fdc229f0dfa9..b38fc21274fd 100644 --- a/drivers/usb/misc/speedtch.c +++ b/drivers/usb/misc/speedtch.c @@ -366,8 +366,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu /* 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 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu /* 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 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu 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 @@ made_progress: kfree_skb (skb); instance->current_skb = NULL; - if (vcc->stats) - atomic_inc (&vcc->stats->tx); + atomic_inc (&vcc->stats->tx); } goto made_progress; |
