diff options
author | Rupert Muchembled <rupert@rmuch.net> | 2013-11-08 06:01:49 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-12 00:34:54 (GMT) |
commit | 473b1716256d2b01bfd105e6af96ccc34b951fe3 (patch) | |
tree | 87e77ffb7e273d7d4d28a79dd76a18a106ca3e48 /drivers | |
parent | a82c40cba28266186eff04bde6e368083eefa687 (diff) | |
download | linux-473b1716256d2b01bfd105e6af96ccc34b951fe3.tar.xz |
Staging: silicom: Remove unnecessary variable from get_bypass_info()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/silicom/bypasslib/bypass.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/silicom/bypasslib/bypass.c b/drivers/staging/silicom/bypasslib/bypass.c index 7d2cb54..dda1b2a 100644 --- a/drivers/staging/silicom/bypasslib/bypass.c +++ b/drivers/staging/silicom/bypasslib/bypass.c @@ -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 *)𝔦 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 |