Staging: silicom: Remove unnecessary variable from do_cmd()
authorRupert Muchembled <rupert@rmuch.net>
Fri, 8 Nov 2013 06:01:48 +0000 (06:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 00:34:54 +0000 (16:34 -0800)
Remove unnecessary variable ioctl from do_cmd().

As a consequence, this patch removes an assignment to ioctl in an if condition,
reported by checkpatch.pl.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/silicom/bypasslib/bypass.c

index ba0d23a1cfbe262f028e31dac3726f04a2395d36..7d2cb54ad6c05922c2f201c2428a550fa2ba5b15 100644 (file)
@@ -47,13 +47,13 @@ static int do_cmd(struct net_device *dev, struct ifreq *ifr, int cmd, int *data)
 {
        int ret = -1;
        struct if_bypass *bypass_cb;
-       static int (*ioctl) (struct net_device *, struct ifreq *, int);
 
        bypass_cb = (struct if_bypass *)ifr;
        bypass_cb->cmd = cmd;
        bypass_cb->data = *data;
-       if ((dev->netdev_ops) && (ioctl = dev->netdev_ops->ndo_do_ioctl)) {
-               ret = ioctl(dev, ifr, SIOCGIFBYPASS);
+
+       if (dev->netdev_ops && dev->netdev_ops->ndo_do_ioctl) {
+               ret = dev->netdev_ops->ndo_do_ioctl(dev, ifr, SIOCGIFBYPASS);
                *data = bypass_cb->data;
        }