* [patch] isdn: remove duplicate NULL check
@ 2012-05-17 6:51 Dan Carpenter
2012-05-17 8:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-05-17 6:51 UTC (permalink / raw)
To: Karsten Keil
Cc: David Howells, Phil Carmody, netdev, kernel-janitors,
David S. Miller
We test both "!skb_out" and "skb_out" here which is duplicative and
causes a static checker warning. I considered that the intent might
have been to test "skb_in" but that's a valid pointer here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c
index c59e8d2..8837ac5 100644
--- a/drivers/isdn/i4l/isdn_bsdcomp.c
+++ b/drivers/isdn/i4l/isdn_bsdcomp.c
@@ -612,7 +612,7 @@ static int bsd_compress(void *state, struct sk_buff *skb_in, struct sk_buff *skb
db->n_bits++;
/* If output length is too large then this is an incompressible frame. */
- if (!skb_out || (skb_out && skb_out->len >= skb_in->len)) {
+ if (!skb_out || skb_out->len >= skb_in->len) {
++db->incomp_count;
db->incomp_bytes += isize;
return 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] isdn: remove duplicate NULL check
2012-05-17 6:51 [patch] isdn: remove duplicate NULL check Dan Carpenter
@ 2012-05-17 8:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-05-17 8:48 UTC (permalink / raw)
To: dan.carpenter; +Cc: isdn, dhowells, ext-phil.2.carmody, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 17 May 2012 09:51:02 +0300
> We test both "!skb_out" and "skb_out" here which is duplicative and
> causes a static checker warning. I considered that the intent might
> have been to test "skb_in" but that's a valid pointer here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-17 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 6:51 [patch] isdn: remove duplicate NULL check Dan Carpenter
2012-05-17 8:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).