* [PATCH 12/14] USB speedtouch: remove useless NULL pointer checks
@ 2003-05-20 23:05 Duncan Sands
0 siblings, 0 replies; only message in thread
From: Duncan Sands @ 2003-05-20 23:05 UTC (permalink / raw)
To: linux-usb-devel; +Cc: Greg KH, linux-kernel
The stats field is never NULL.
speedtch.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c
--- a/drivers/usb/misc/speedtch.c Wed May 21 00:41:05 2003
+++ b/drivers/usb/misc/speedtch.c Wed May 21 00:41:05 2003
@@ -358,8 +358,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;
}
@@ -378,8 +377,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;
}
@@ -387,8 +385,7 @@
skb_trim (skb, length);
/* update stats */
- if (ctx->vcc->stats)
- atomic_inc (&ctx->vcc->stats->rx);
+ atomic_inc (&ctx->vcc->stats->rx);
vdbg ("udsl_decode_aal5 returns pdu 0x%p with length %d", skb, skb->len);
return skb;
@@ -760,8 +757,7 @@
dev_kfree_skb (skb);
instance->current_skb = NULL;
- if (vcc->stats)
- atomic_inc (&vcc->stats->tx);
+ atomic_inc (&vcc->stats->tx);
}
goto made_progress;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-20 22:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-20 23:05 [PATCH 12/14] USB speedtouch: remove useless NULL pointer checks Duncan Sands
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®