瀏覽代碼

Fixed two logic errors that were cancelling each other out.

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
f944737045
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/drivers/net/etherfabric.c

+ 3
- 3
src/drivers/net/etherfabric.c 查看文件

@@ -2273,7 +2273,7 @@ static int falcon_spi_rw ( struct spi_bus *bus, struct spi_device *device,
2273 2273
 		memcpy ( data_in, &reg, len );
2274 2274
 	}
2275 2275
 	
2276
-	return 1;
2276
+	return 0;
2277 2277
 }
2278 2278
 
2279 2279
 /**
@@ -2315,8 +2315,8 @@ static int falcon_read_eeprom ( struct efab_nic *efab ) {
2315 2315
 	nvs = ( efab->has_flash ?
2316 2316
 		&efab->falcon_flash.nvs : &efab->falcon_eeprom.nvs );
2317 2317
 
2318
-	return nvs_read ( nvs, FALCON_MAC_ADDRESS_OFFSET ( efab->port ),
2319
-			  efab->mac_addr, sizeof ( efab->mac_addr ) );
2318
+	return ( nvs_read ( nvs, FALCON_MAC_ADDRESS_OFFSET ( efab->port ),
2319
+			    efab->mac_addr, sizeof ( efab->mac_addr ) ) == 0 );
2320 2320
 }
2321 2321
 
2322 2322
 /** RX descriptor */

Loading…
取消
儲存