Skip to content

Commit e998fd4

Browse files
elopezdavem330
authored andcommitted
net: ethernet: korina: initialize variables directly
Clean up the code a bit to initialize the variables directly when defining them. Signed-off-by: Emilio López <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 35e729a commit e998fd4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/ethernet/korina.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,9 @@ static void korina_multicast_list(struct net_device *dev)
495495

496496
/* Build the hash table */
497497
if (netdev_mc_count(dev) > 4) {
498-
u16 hash_table[4];
498+
u16 hash_table[4] = { 0 };
499499
u32 crc;
500500

501-
for (i = 0; i < 4; i++)
502-
hash_table[i] = 0;
503-
504501
netdev_for_each_mc_addr(ha, dev) {
505502
crc = ether_crc_le(6, ha->addr);
506503
crc >>= 26;

0 commit comments

Comments
 (0)