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>
This commit is contained in:
parent
a82c40cba2
commit
473b171625
|
@ -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,
|
SET_BPLIB_INT_FN2(get_bypass_info, int, if_index,
|
||||||
struct bp_info *, bp_info, ret);
|
struct bp_info *, bp_info, ret);
|
||||||
} else {
|
} else {
|
||||||
static int (*ioctl) (struct net_device *, struct ifreq *, int);
|
|
||||||
struct net_device *dev;
|
struct net_device *dev;
|
||||||
|
|
||||||
struct net_device *n;
|
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 = (struct if_bypass_info *)𝔦
|
||||||
bypass_cb->cmd = GET_BYPASS_INFO;
|
bypass_cb->cmd = GET_BYPASS_INFO;
|
||||||
|
|
||||||
if ((dev->netdev_ops) &&
|
if (dev->netdev_ops &&
|
||||||
(ioctl = dev->netdev_ops->ndo_do_ioctl)) {
|
dev->netdev_ops->ndo_do_ioctl) {
|
||||||
ret = ioctl(dev, &ifr, SIOCGIFBYPASS);
|
ret = dev->netdev_ops->ndo_do_ioctl(dev,
|
||||||
|
&ifr, SIOCGIFBYPASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue