Commit 351e836f authored by Vincent Heuken's avatar Vincent Heuken Committed by Greg Kroah-Hartman

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: default avatarVincent Heuken <me@vincentheuken.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 464cad2c
...@@ -740,9 +740,9 @@ static bool slic_mac_filter(struct adapter *adapter, ...@@ -740,9 +740,9 @@ static bool slic_mac_filter(struct adapter *adapter,
if (opts & MAC_BCAST) { if (opts & MAC_BCAST) {
adapter->rcv_broadcasts++; adapter->rcv_broadcasts++;
return true; return true;
} else {
return false;
} }
return false;
} }
if (is_multicast_ether_addr(ether_frame->ether_dhost)) { if (is_multicast_ether_addr(ether_frame->ether_dhost)) {
...@@ -763,10 +763,11 @@ static bool slic_mac_filter(struct adapter *adapter, ...@@ -763,10 +763,11 @@ static bool slic_mac_filter(struct adapter *adapter,
} }
mcaddr = mcaddr->next; mcaddr = mcaddr->next;
} }
return false;
} else {
return false; return false;
} }
return false;
} }
if (opts & MAC_DIRECTED) { if (opts & MAC_DIRECTED) {
adapter->rcv_unicasts++; adapter->rcv_unicasts++;
...@@ -2714,9 +2715,10 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) ...@@ -2714,9 +2715,10 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
dev_err(&adapter->pcidev->dev, dev_err(&adapter->pcidev->dev,
"Failed to allocate DMA memory for EEPROM.\n"); "Failed to allocate DMA memory for EEPROM.\n");
return -ENOMEM; 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); slic_reg32_write(&slic_regs->slic_icr, ICR_INT_OFF, FLUSH);
mdelay(1); mdelay(1);
pshmem = (struct slic_shmem *)(unsigned long) pshmem = (struct slic_shmem *)(unsigned long)
...@@ -2751,11 +2753,11 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) ...@@ -2751,11 +2753,11 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
slic_upr_request_complete(adapter, 0); slic_upr_request_complete(adapter, 0);
break; 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 { } else {
mdelay(1); mdelay(1);
i++; i++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment