Skip to contentSkip to conversation

staging: bcm: remove unnecessary else statement

PATCH In review Karthik Nayak 2 participants 2 messages Sep 30, 2014 – Oct 8, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: bcm: remove unnecessary else statement

Removed the else statement occurring after an if statement with a return value as per checkpatch warning.

---
 drivers/staging/bcm/InterfaceMisc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/bcm/InterfaceMisc.c +4 -5
index e5bcfec..1f31b8f 100644
@@ -102,12 +102,11 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter,
 				DBG_LVL_ALL, "WRM failed status :%d", retval);
 		psIntfAdapter->psAdapter->DeviceAccess = false;
 		return retval;
-	} else {
-		psIntfAdapter->psAdapter->DeviceAccess = false;
-		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM,
-				DBG_LVL_ALL, "WRM sent %d", retval);
-		return STATUS_SUCCESS;
 	}
+	psIntfAdapter->psAdapter->DeviceAccess = false;
+	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM,
+			DBG_LVL_ALL, "WRM sent %d", retval);
+	return STATUS_SUCCESS;
 }
 
 int BcmRDM(void *arg,
Signature · 1 line
2.1.0
maintainer
#1 lore raw
Quoted 31 lines · Karthik Nayak

Removed the else statement occurring after an if statement with a return value as per checkpatch warning.

---
 drivers/staging/bcm/InterfaceMisc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/bcm/InterfaceMisc.c +4 -5
index e5bcfec..1f31b8f 100644
@@ -102,12 +102,11 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter,
 				DBG_LVL_ALL, "WRM failed status :%d", retval);
 		psIntfAdapter->psAdapter->DeviceAccess = false;
 		return retval;
-	} else {
-		psIntfAdapter->psAdapter->DeviceAccess = false;
-		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM,
-				DBG_LVL_ALL, "WRM sent %d", retval);
-		return STATUS_SUCCESS;
 	}
+	psIntfAdapter->psAdapter->DeviceAccess = false;
+	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM,
+			DBG_LVL_ALL, "WRM sent %d", retval);
+	return STATUS_SUCCESS;
 }
 
 int BcmRDM(void *arg,
Signature · 1 line
2.1.0

This doesn't apply either, someone else must have done this change already.