This patch will unify exit point for s_uGetDataDuration function. Signed-off-by: Matej Dujava <mdujava@xxxxxxxxxxxx> --- drivers/staging/vt6655/rxtx.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 61f7077bb75f..c4d62c27f1c1 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -264,14 +264,12 @@ s_uGetDataDuration( if ((uMACfragNum == 1) || bLastFrag) { if (!bNeedAck) return 0; - return pDevice->uSIFS + uAckTime; } else { /* First Frag or Mid Frag */ uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len, wRate, bNeedAck); - - return pDevice->uSIFS + uAckTime + uNextPktTime; } - break; + + return pDevice->uSIFS + uAckTime + uNextPktTime; case DATADUR_A: /* DATADUR_A */ if (bNeedAck) { @@ -283,15 +281,13 @@ s_uGetDataDuration( if ((uMACfragNum == 1) || bLastFrag) { if (!bNeedAck) return 0; - return pDevice->uSIFS + uAckTime; } else { /* First Frag or Mid Frag */ uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len, wRate, bNeedAck); - - return pDevice->uSIFS + uAckTime + uNextPktTime; } - break; + + return pDevice->uSIFS + uAckTime + uNextPktTime; case DATADUR_A_F0: /* DATADUR_A_F0 */ case DATADUR_A_F1: /* DATADUR_A_F1 */ @@ -304,7 +300,6 @@ s_uGetDataDuration( if ((uMACfragNum == 1) || bLastFrag) { if (!bNeedAck) return 0; - return pDevice->uSIFS + uAckTime; } else { /* First Frag or Mid Frag */ if (wRate < RATE_18M) @@ -323,10 +318,9 @@ s_uGetDataDuration( wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); } - - return pDevice->uSIFS + uAckTime + uNextPktTime; } - break; + + return pDevice->uSIFS + uAckTime + uNextPktTime; default: break; -- 2.26.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel