summaryrefslogtreecommitdiffstats
path: root/drivers/staging/et131x
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2014-05-20 12:33:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-23 20:43:47 +0900
commit8ea6cdf527aa4439604a4712ff2a35373471e367 (patch)
tree147f2903843c7eef1a564b9b096fc2fa1710b7f8 /drivers/staging/et131x
parent43b54cc91b5d13110a99ef65a981c8bec9e68328 (diff)
staging: et131x: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r--drivers/staging/et131x/et131x.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index d329cf31436..1ac718476ed 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -4237,7 +4237,6 @@ static int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf,
static int et131x_set_packet_filter(struct et131x_adapter *adapter)
{
int filter = adapter->packet_filter;
- int status = 0;
u32 ctrl;
u32 pf_ctrl;
@@ -4288,7 +4287,7 @@ static int et131x_set_packet_filter(struct et131x_adapter *adapter)
writel(pf_ctrl, &adapter->regs->rxmac.pf_ctrl);
writel(ctrl, &adapter->regs->rxmac.ctrl);
}
- return status;
+ return 0;
}
/* et131x_multicast - The handler to configure multicasting on the interface */