2010-11-14 20:08:45

by Vasily Kulikov

[permalink] [raw]
Subject: [PATCH] net: bnx2x: fix error value sign

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

Signed-off-by: Vasiliy Kulikov <[email protected]>
---
Compile tested.

drivers/net/bnx2x/bnx2x_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 4a6f0ea..be52edc 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -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;
--
1.7.0.4


2010-11-14 20:26:58

by Eilon Greenstein

[permalink] [raw]
Subject: Re: [PATCH] net: bnx2x: fix error value sign

On Sun, 2010-11-14 at 12:08 -0800, Vasiliy Kulikov wrote:
> bnx2x_init_one() should return negative value on error.
> By mistake it returns ENODEV instead of -ENODEV.
>
> Signed-off-by: Vasiliy Kulikov <[email protected]>
Thanks Vasiliy!

Acked-by: Eilon Greenstein <[email protected]>
> ---
> Compile tested.
>
> drivers/net/bnx2x/bnx2x_main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
> index 4a6f0ea..be52edc 100644
> --- a/drivers/net/bnx2x/bnx2x_main.c
> +++ b/drivers/net/bnx2x/bnx2x_main.c
> @@ -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;



2010-11-14 20:29:55

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] net: bnx2x: fix error value sign

Le dimanche 14 novembre 2010 à 23:08 +0300, Vasiliy Kulikov a écrit :
> bnx2x_init_one() should return negative value on error.
> By mistake it returns ENODEV instead of -ENODEV.
>
> Signed-off-by: Vasiliy Kulikov <[email protected]>
> ---
> Compile tested.
>
> drivers/net/bnx2x/bnx2x_main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
> index 4a6f0ea..be52edc 100644
> --- a/drivers/net/bnx2x/bnx2x_main.c
> +++ b/drivers/net/bnx2x/bnx2x_main.c
> @@ -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...


2010-11-14 20:32:20

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] net: bnx2x: fix error value sign

Le dimanche 14 novembre 2010 à 21:29 +0100, Eric Dumazet a écrit :

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

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


2010-11-17 20:22:37

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: bnx2x: fix error value sign

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

> Le dimanche 14 novembre 2010 ? 21:29 +0100, Eric Dumazet a ?crit :
>
>> I remember sending same patch in the past... it was lost somehow...
>
> Ah, it was another issue, patch was not lost ;)

:-) Applied, thanks everyone.