Skip to contentSkip to conversation

net: bnx2x: fix error value sign

PATCH In review Vasiliy Kulikov 4 participants 5 messages Nov 14, 2010 – Nov 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bnx2x: fix error value sign

bnx2x_init_one() should return negative value on error. By mistake it returns ENODEV instead of -ENODEV.

---
Compile tested.

 drivers/net/bnx2x/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bnx2x/bnx2x_main.c +1 -1
index 4a6f0ea..be52edc 100644
@@ -9064,7 +9064,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 	default:
 		pr_err("Unknown board_type (%ld), aborting\n",
 			   ent->driver_data);
-		return ENODEV;
+		return -ENODEV;
 	}
 
 	cid_count += CNIC_CONTEXT_USE;
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Vasiliy Kulikov

bnx2x_init_one() should return negative value on error. By mistake it returns ENODEV instead of -ENODEV.

Thanks Vasiliy!

Quoted 19 lines

---
Compile tested.

 drivers/net/bnx2x/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bnx2x/bnx2x_main.c +1 -1
index 4a6f0ea..be52edc 100644
@@ -9064,7 +9064,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 	default:
 		pr_err("Unknown board_type (%ld), aborting\n",
 			   ent->driver_data);
-		return ENODEV;
+		return -ENODEV;
 	}
 
 	cid_count += CNIC_CONTEXT_USE;
#2 lore raw
In reply to Vasiliy Kulikov
Quoted 15 lines · Vasiliy Kulikov

bnx2x_init_one() should return negative value on error. By mistake it returns ENODEV instead of -ENODEV.

---
Compile tested.

 drivers/net/bnx2x/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bnx2x/bnx2x_main.c +0 -0
index 4a6f0ea..be52edc 100644

drivers/net/bnx2x/bnx2x_main.c static int __devinit bnx2x_init_one(struct pci_dev *pdev, · line 9070

Quoted 8 lines
drivers/net/bnx2x/bnx2x_main.c +1 -1
@@ -9064,7 +9064,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 	default:
 		pr_err("Unknown board_type (%ld), aborting\n",
 			   ent->driver_data);
-		return ENODEV;
+		return -ENODEV;
 	}
 
 	cid_count += CNIC_CONTEXT_USE;

I remember sending same patch in the past... it was lost somehow...

#3 lore raw
Quoted 1 line · Eric Dumazet

I remember sending same patch in the past... it was lost somehow...

Ah, it was another issue, patch was not lost ;)

maintainer
#4 lore raw

From: Eric Dumazet <[email protected]>
Date: Sun, 14 Nov 2010 21:32:08 +0100

Quoted 5 lines · Eric Dumazet
Quoted 2 lines

I remember sending same patch in the past... it was lost somehow...

Ah, it was another issue, patch was not lost ;)

:-) Applied, thanks everyone.