From: Matthias Beyer Date: Tue, 29 Jul 2014 12:48:30 +0000 (+0200) Subject: Staging: bcm: IPv6Protocol.c: Removed unnecessary if-else blocks X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a370ad07b77f91111e29ca0304dcda5895b8f291;p=linux-beck.git Staging: bcm: IPv6Protocol.c: Removed unnecessary if-else blocks This patch simplifies if (a) { x = false; } else { if (b) { x = false; } } to if (a || b) { x = false; } Signed-off-by: Matthias Beyer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 44021da1dc2b..5bcdaf949e97 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c @@ -272,12 +272,9 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader, INT iMatchedSFQueueIndex = 0; iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); - if (iMatchedSFQueueIndex >= NO_OF_QUEUES) { + if ((iMatchedSFQueueIndex >= NO_OF_QUEUES) || + (Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false)) bClassificationSucceed = false; - } else { - if (Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false) - bClassificationSucceed = false; - } } return bClassificationSucceed;