]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8712: fix unnecessary elses after return/break in rtl8712_efuse.c
authorSerguey Parkhomovsky <xindigo@gmail.com>
Wed, 8 Oct 2014 03:42:45 +0000 (20:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:26 +0000 (10:29 +0800)
This patch fixes two unnecessary else conditions that were found by checkpatch.pl.

Signed-off-by: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_efuse.c

index c9eeb4270ab9d84e4a8619d8f4d9270bfe9ba085..97b78392e6c8569779f62fcdb1f1d2508d8f0ea6 100644 (file)
@@ -414,19 +414,18 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
                                        bResult = false;
                        }
                        break;
-               } else { /* write header fail */
-                       bResult = false;
-                       if (0xFF == efuse_data)
-                               return bResult; /* nothing damaged. */
-                       /* call rescue procedure */
-                       if (fix_header(padapter, efuse_data, efuse_addr) ==
-                           false)
-                               return false; /* rescue fail */
-
-                       if (++repeat_times > _REPEAT_THRESHOLD_) /* fail */
-                               break;
-                       /* otherwise, take another risk... */
                }
+               /* write header fail */
+               bResult = false;
+               if (0xFF == efuse_data)
+                       return bResult; /* nothing damaged. */
+               /* call rescue procedure */
+               if (!fix_header(padapter, efuse_data, efuse_addr))
+                       return false; /* rescue fail */
+
+               if (++repeat_times > _REPEAT_THRESHOLD_) /* fail */
+                       break;
+               /* otherwise, take another risk... */
        }
        return bResult;
 }
@@ -541,15 +540,16 @@ u8 r8712_efuse_map_write(struct _adapter *padapter, u16 addr, u16 cnts,
                                }
                                idx++;
                                break;
-                       } else {
-                               if ((data[idx] != pktdata[i]) || (data[idx+1] !=
-                                    pktdata[i+1])) {
-                                       word_en &= ~BIT(i >> 1);
-                                       newdata[j++] = data[idx];
-                                       newdata[j++] = data[idx + 1];
-                               }
-                               idx += 2;
                        }
+
+                       if ((data[idx] != pktdata[i]) || (data[idx+1] !=
+                            pktdata[i+1])) {
+                               word_en &= ~BIT(i >> 1);
+                               newdata[j++] = data[idx];
+                               newdata[j++] = data[idx + 1];
+                       }
+                       idx += 2;
+
                        if (idx == cnts)
                                break;
                }