Skip to contentSkip to conversation

Staging: bcm: Fixed else after return or break warning

PATCH New Yeliz Taneroglu 1 participant 1 message Feb 21, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: bcm: Fixed else after return or break warning

The following patch fixes the checkpatch.pl warning:
drivers/staging/bcm/led_control.c warning: else is not generally useful after a break or return

---
 drivers/staging/bcm/led_control.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/bcm/led_control.c +2 -4
index 074fc39..c3c6280 100644
@@ -21,8 +21,7 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios)
 	Status = (Adapter->gpioBitMap & gpios) ^ gpios;
 	if (Status)
 		return false;
-	else
-		return TRUE;
+	return TRUE;
 }
 
 static INT LED_Blink(struct bcm_mini_adapter *Adapter,
@@ -95,8 +94,7 @@ static INT ScaleRateofTransfer(ULONG rate)
 		return 9;
 	else if ((rate > 500) && (rate <= 600))
 		return 10;
-	else
-		return MAX_NUM_OF_BLINKS;
+	return MAX_NUM_OF_BLINKS;
 }
 
 static INT blink_in_normal_bandwidth(struct bcm_mini_adapter *ad,
Signature · 1 line
1.8.3.2