diff options
author | Joel A. Fowler <fowlerja@us.ibm.com> | 2009-03-23 23:27:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-24 18:24:31 -0400 |
commit | e2fc8cb4fedf57a63c05cd1e0f6e4f0e0238614a (patch) | |
tree | 6a1c128870d78419921db7b4b6b6522b5d398a9a /drivers/s390/net/ctcm_main.c | |
parent | fb8585fc3f9b39153e0bdaf03f00a02dde9c03c6 (diff) |
ctcm: fix minor findings from code analysis tool
From: Ursula Braun <ursula.braun@de.ibm.com>
This patch fixes problems in the ctcm driver identified by
static code analysis:
o remove an unnecessary always true condition in ctcm_unpack_skb
o remove duplicate assignment in ctc_mpc_alloc_channel
o remove an unnecessary always true condition in ctcmpc_send_sweep_resp
o remove duplicate initialization in ctcmpc_unpack_skb
o shorten if condition in mpc_action_go_inop
o remove INOP event if mpc group is undefined in mpc_action_doxid7
Signed-off-by: Joel A. Fowler <fowlerja@us.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/ctcm_main.c')
-rw-r--r-- | drivers/s390/net/ctcm_main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index a7a25383db76..77f4033a0f4f 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c | |||
@@ -168,11 +168,9 @@ void ctcm_unpack_skb(struct channel *ch, struct sk_buff *pskb) | |||
168 | if (len > 0) { | 168 | if (len > 0) { |
169 | skb_pull(pskb, header->length); | 169 | skb_pull(pskb, header->length); |
170 | if (skb_tailroom(pskb) < LL_HEADER_LENGTH) { | 170 | if (skb_tailroom(pskb) < LL_HEADER_LENGTH) { |
171 | if (!(ch->logflags & LOG_FLAG_OVERRUN)) { | 171 | CTCM_DBF_DEV_NAME(TRACE, dev, |
172 | CTCM_DBF_DEV_NAME(TRACE, dev, | 172 | "Overrun in ctcm_unpack_skb"); |
173 | "Overrun in ctcm_unpack_skb"); | 173 | ch->logflags |= LOG_FLAG_OVERRUN; |
174 | ch->logflags |= LOG_FLAG_OVERRUN; | ||
175 | } | ||
176 | return; | 174 | return; |
177 | } | 175 | } |
178 | skb_put(pskb, LL_HEADER_LENGTH); | 176 | skb_put(pskb, LL_HEADER_LENGTH); |