summaryrefslogtreecommitdiff
path: root/drivers/net/caif
diff options
context:
space:
mode:
authorKim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com>2012-06-25 07:49:36 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-25 16:44:12 -0700
commit4e7bb59d49fb00d4cf13484386d0400783f2c826 (patch)
treed1c06de7b71c55249482c21f1ce19c2b9b94b640 /drivers/net/caif
parentf315fd355ffaec6a9ad541081975ac821404256e (diff)
downloadlinux-stable-4e7bb59d49fb00d4cf13484386d0400783f2c826.tar.gz
linux-stable-4e7bb59d49fb00d4cf13484386d0400783f2c826.tar.bz2
linux-stable-4e7bb59d49fb00d4cf13484386d0400783f2c826.zip
caif-hsi: Removed dead code
Simplify logic and remove dead code. Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/caif')
-rw-r--r--drivers/net/caif/caif_hsi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 1520814c77c7..f81f61fb39bc 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -680,12 +680,11 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi)
if (desc_pld_len < 0)
goto out_of_sync;
- if (desc_pld_len > 0)
+ if (desc_pld_len > 0) {
rx_len = desc_pld_len;
-
- if (desc_pld_len > 0 &&
- (piggy_desc->header & CFHSI_PIGGY_DESC))
- rx_len += CFHSI_DESC_SZ;
+ if (piggy_desc->header & CFHSI_PIGGY_DESC)
+ rx_len += CFHSI_DESC_SZ;
+ }
/*
* Copy needed information from the piggy-backed
@@ -695,8 +694,6 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi)
CFHSI_DESC_SHORT_SZ);
/* Mark no embedded frame here */
piggy_desc->offset = 0;
- if (desc_pld_len == -EPROTO)
- goto out_of_sync;
}
}