Staging: silicom: Remove unnecessary variable from get_bypass_info()
authorRupert Muchembled <rupert@rmuch.net>
Fri, 8 Nov 2013 06:01:49 +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 get_bypass_info().

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 7d2cb54ad6c05922c2f201c2428a550fa2ba5b15..dda1b2a6b84b85065f83a1df83d7d0c10c2d11bc 100644 (file)
@@ -480,7 +480,6 @@ static int get_bypass_info(int if_index, struct bp_info *bp_info)
                SET_BPLIB_INT_FN2(get_bypass_info, int, if_index,
                                  struct bp_info *, bp_info, ret);
        } else {
-               static int (*ioctl) (struct net_device *, struct ifreq *, int);
                struct net_device *dev;
 
                struct net_device *n;
@@ -493,9 +492,10 @@ static int get_bypass_info(int if_index, struct bp_info *bp_info)
                                bypass_cb = (struct if_bypass_info *)&ifr;
                                bypass_cb->cmd = GET_BYPASS_INFO;
 
-                               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);
                                }
 
                                else