Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74411c04 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

smc91c92_cs.c: fix bogus compiler warning



On a recent compile, I got this warning:

  CC [M]  drivers/net/pcmcia/smc91c92_cs.o
drivers/net/pcmcia/smc91c92_cs.c: In function ‘smc91c92_probe’:
drivers/net/pcmcia/smc91c92_cs.c:812:12: warning: ‘j’ may be used uninitialized in this function

However, "j" is only used in a branch which has the same condition as
a previous branch, where j is set, e.g.

	int j;

	if (CONDITION)
	    j = VALUE

	...

	if (CONDITION)
	   printk(j)

Still, avoid this warning, as it is easy to circumvent.

Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 49e58a93
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -809,7 +809,7 @@ static int smc91c92_config(struct pcmcia_device *link)
    struct net_device *dev = link->priv;
    struct net_device *dev = link->priv;
    struct smc_private *smc = netdev_priv(dev);
    struct smc_private *smc = netdev_priv(dev);
    char *name;
    char *name;
    int i, j, rev;
    int i, rev, j = 0;
    unsigned int ioaddr;
    unsigned int ioaddr;
    u_long mir;
    u_long mir;