2011-06-06 00:44:20

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH] qlge: remove unecessary if statement

the code always returns 'status' regardless, so if(status) check is unecessary.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/qlge/qlge_ethtool.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index 19b00fa..9b67bfe 100644
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@ -650,8 +650,6 @@ static int ql_set_pauseparam(struct net_device *netdev,
return -EINVAL;

status = ql_mb_set_port_cfg(qdev);
- if (status)
- return status;
return status;
}

--
1.7.2.5


2011-06-07 05:53:27

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] qlge: remove unecessary if statement

From: Greg Dietsche <[email protected]>
Date: Sun, 5 Jun 2011 19:44:13 -0500

> the code always returns 'status' regardless, so if(status) check is unecessary.
>
> Signed-off-by: Greg Dietsche <[email protected]>

Applied, thanks.