From a82c40cba28266186eff04bde6e368083eefa687 Mon Sep 17 00:00:00 2001 From: Rupert Muchembled Date: Fri, 8 Nov 2013 06:01:48 +0000 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/silicom/bypasslib/bypass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/silicom/bypasslib/bypass.c b/drivers/staging/silicom/bypasslib/bypass.c index ba0d23a1cfbe..7d2cb54ad6c0 100644 --- a/drivers/staging/silicom/bypasslib/bypass.c +++ b/drivers/staging/silicom/bypasslib/bypass.c @@ -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; } -- 2.30.2