Commit fb31074a authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] USB speedtouch: remove useless NULL pointer checks

The stats field is never NULL.
parent 7748fd33
......@@ -358,7 +358,6 @@ 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);
return NULL;
}
......@@ -378,7 +377,6 @@ 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);
return NULL;
}
......@@ -387,7 +385,6 @@ 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);
vdbg ("udsl_decode_aal5 returns pdu 0x%p with length %d", skb, skb->len);
......@@ -760,7 +757,6 @@ static void udsl_process_send (unsigned long data)
dev_kfree_skb (skb);
instance->current_skb = NULL;
if (vcc->stats)
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