From: =?unknown-8bit?q?J=CE=B5an?= Sacren <sakiwit@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next-queue 8/8] e1000: get rid of duplicate exit path
Date: Mon, 14 Sep 2015 00:27:50 -0600 [thread overview]
Message-ID: <1442212070-24937-9-git-send-email-sakiwit@gmail.com> (raw)
In-Reply-To: <1442212070-24937-1-git-send-email-sakiwit@gmail.com>
From: Jean Sacren <sakiwit@gmail.com>
By using goto statement, we can achieve sharing the same exit path so
that code duplication could be minimized.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index a67a2c4499eb..737d5c79256b 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -2824,14 +2824,13 @@ s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 *phy_data)
(reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
(u16) reg_addr);
- if (ret_val) {
- spin_unlock_irqrestore(&e1000_phy_lock, flags);
- return ret_val;
- }
+ if (ret_val)
+ goto out;
}
ret_val = e1000_read_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr,
phy_data);
+out:
spin_unlock_irqrestore(&e1000_phy_lock, flags);
return ret_val;
prev parent reply other threads:[~2015-09-14 6:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 6:27 [Intel-wired-lan] [next-queue 0/8] Trivial fix-ups for Intel wired LAN drivers 09/10/2015 =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 1/8] e1000: clean up the useless 'continue' statement =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 16:48 ` Rustad, Mark D
2015-09-15 5:35 ` =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-15 18:24 ` Rustad, Mark D
2015-09-16 15:34 ` =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-16 16:38 ` Alexander Duyck
2015-09-16 18:27 ` Rustad, Mark D
2015-09-16 21:09 ` Alexander Duyck
2015-09-16 23:36 ` Rustad, Mark D
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 2/8] e1000: fix a typo in the comment =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 3/8] e1000e: clean up the local variable =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 4/8] i40e: fix kernel-doc argument name =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-22 21:27 ` Bowers, AndrewX
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 5/8] ixgbe: fix multiple kernel-doc errors =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 6/8] i40e: declare rather than initialize int object =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` [Intel-wired-lan] [next-queue 7/8] e1000: fix kernel-doc argument being missing =?unknown-8bit?q?J=CE=B5an?= Sacren
2015-09-14 6:27 ` =?unknown-8bit?q?J=CE=B5an?= Sacren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442212070-24937-9-git-send-email-sakiwit@gmail.com \
--to=sakiwit@gmail.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox