Commit a82c40cb authored by Rupert Muchembled's avatar Rupert Muchembled Committed by Greg Kroah-Hartman

Staging: silicom: Remove unnecessary variable from do_cmd()

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: default avatarRupert Muchembled <rupert@rmuch.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0fde117
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment