Commit 2aea7c00 authored by Duncan Sands's avatar Duncan Sands Committed by Linus Torvalds

[PATCH] USB speedtouch: remove useless NULL pointer checks

The stats field is never NULL.
parent 3dfedcfe
...@@ -366,7 +366,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu ...@@ -366,7 +366,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
/* is skb long enough ? */ /* is skb long enough ? */
if (skb->len < pdu_length) { 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; return NULL;
} }
...@@ -386,7 +385,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu ...@@ -386,7 +385,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
/* check crc */ /* check crc */
if (pdu_crc != crc) { if (pdu_crc != crc) {
dbg ("udsl_decode_aal5: crc check failed!"); 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; return NULL;
} }
...@@ -395,7 +393,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu ...@@ -395,7 +393,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
skb_trim (skb, length); skb_trim (skb, length);
/* update stats */ /* 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); dbg ("udsl_decode_aal5 returns pdu 0x%p with length %d", skb, skb->len);
...@@ -778,7 +775,6 @@ static void udsl_process_send (unsigned long data) ...@@ -778,7 +775,6 @@ static void udsl_process_send (unsigned long data)
kfree_skb (skb); kfree_skb (skb);
instance->current_skb = NULL; instance->current_skb = NULL;
if (vcc->stats)
atomic_inc (&vcc->stats->tx); atomic_inc (&vcc->stats->tx);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment