Skip to contentSkip to conversation

isdn: remove duplicate NULL check

PATCH Applied Dan Carpenter 2 participants 2 messages May 17, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn: remove duplicate NULL check

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.

drivers/isdn/i4l/isdn_bsdcomp.c +1 -1
index c59e8d2..8837ac5 100644
@@ -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;
maintainer Applied
#1 lore raw

From: Dan Carpenter <[email protected]>
Date: Thu, 17 May 2012 09:51:02 +0300

Quoted 5 lines

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.

Applied, thanks.