From: Wei Yongjun <[email protected]>

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
 drivers/net/ethernet/intel/igb/igb_hwmon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c 
b/drivers/net/ethernet/intel/igb/igb_hwmon.c
index 0478a1a..3b750b2 100644
--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
+++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
@@ -208,6 +208,7 @@ int igb_sysfs_init(struct igb_adapter *adapter)
        if (client == NULL) {
                dev_info(&adapter->pdev->dev,
                        "Failed to create new i2c device..\n");
+               rc = -ENOMEM;
                goto exit;
        }
        adapter->i2c_client = client;


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to