caif-hsi: Removed dead code
authorKim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com>
Mon, 25 Jun 2012 07:49:36 +0000 (07:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jun 2012 23:44:12 +0000 (16:44 -0700)
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>
drivers/net/caif/caif_hsi.c

index 1520814c77c7d1a4a94b0569069abb66cb356b51..f81f61fb39bc5c49ec9d42022e855dc720ab1604 100644 (file)
@@ -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;
                }
        }