summaryrefslogtreecommitdiff
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorVincent Heuken <me@vincentheuken.com>2014-06-23 05:09:18 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 21:00:49 -0400
commit351e836fa6cf4eef8a844fa5877826ecbd969ee8 (patch)
treed1aca1da3d18ffad4558d68171a4804bd8e5ae9c /drivers/staging/slicoss
parent464cad2c50ece09be0fd9e21799a749d6aadfda5 (diff)
Staging: slicoss: fixed frivolous else statement warnings in slicoss.c
This is a patch for the slicoss.c file that fixes four instances of the following warning: WARNING: else is not generally useful after a break or return Signed-off-by: Vincent Heuken <me@vincentheuken.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 48841e7c2f74..50ece291fc6a 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -740,9 +740,9 @@ static bool slic_mac_filter(struct adapter *adapter,
if (opts & MAC_BCAST) {
adapter->rcv_broadcasts++;
return true;
- } else {
- return false;
}
+
+ return false;
}
if (is_multicast_ether_addr(ether_frame->ether_dhost)) {
@@ -763,10 +763,11 @@ static bool slic_mac_filter(struct adapter *adapter,
}
mcaddr = mcaddr->next;
}
- return false;
- } else {
+
return false;
}
+
+ return false;
}
if (opts & MAC_DIRECTED) {
adapter->rcv_unicasts++;
@@ -2714,9 +2715,10 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
dev_err(&adapter->pcidev->dev,
"Failed to allocate DMA memory for EEPROM.\n");
return -ENOMEM;
- } else {
- memset(peeprom, 0, sizeof(struct slic_eeprom));
}
+
+ memset(peeprom, 0, sizeof(struct slic_eeprom));
+
slic_reg32_write(&slic_regs->slic_icr, ICR_INT_OFF, FLUSH);
mdelay(1);
pshmem = (struct slic_shmem *)(unsigned long)
@@ -2751,11 +2753,11 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
slic_upr_request_complete(adapter, 0);
break;
- } else {
- adapter->pshmem->isr = 0;
- slic_reg32_write(&slic_regs->slic_isr,
- 0, FLUSH);
}
+
+ adapter->pshmem->isr = 0;
+ slic_reg32_write(&slic_regs->slic_isr,
+ 0, FLUSH);
} else {
mdelay(1);
i++;