netxen: netxen_rom_fast_read() doesn't return -1
The error handling is broken here. netxen_rom_fast_read() returns zero on success and -EIO on error. It never returns -1. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1c755ffa4f
commit
8c1f454625
@ -852,7 +852,8 @@ netxen_check_options(struct netxen_adapter *adapter)
|
||||
ptr32 = (__le32 *)&serial_num;
|
||||
offset = NX_FW_SERIAL_NUM_OFFSET;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (netxen_rom_fast_read(adapter, offset, &val) == -1) {
|
||||
err = netxen_rom_fast_read(adapter, offset, &val);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "error reading board info\n");
|
||||
adapter->driver_mismatch = 1;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user