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: Rupert Muchembled <rupert@rmuch.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Rupert Muchembled 2013-11-08 06:01:48 +00:00 committed by Greg Kroah-Hartman
parent f0fde117c1
commit a82c40cba2
1 changed files with 3 additions and 3 deletions

View 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;
}