Patchwork [2/3] qla3xxx: ethernet: Silence static checker warning.

login
register
mail settings
Submitter santosh nayak
Date March 2, 2012, 3:09 p.m.
Message ID <1330700979-18231-1-git-send-email-santoshprasadnayak@gmail.com>
Download mbox | patch
Permalink /patch/144272/
State Accepted
Delegated to: David Miller
Headers show

Comments

santosh nayak - March 2, 2012, 3:09 p.m.
From: Santosh Nayak <santoshprasadnayak@gmail.com>

Silence the following warning:
"warn: returning -1 instead of -ENOMEM is sloppy".

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
 drivers/net/ethernet/qlogic/qla3xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - March 5, 2012, 9:53 p.m.
From: santosh nayak <santoshprasadnayak@gmail.com>
Date: Fri,  2 Mar 2012 20:39:39 +0530

> From: Santosh Nayak <santoshprasadnayak@gmail.com>
> 
> Silence the following warning:
> "warn: returning -1 instead of -ENOMEM is sloppy".
> 
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index 8da3e41..df09b1c 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -2836,7 +2836,7 @@  static int ql_create_send_free_list(struct ql3_adapter *qdev)
 		req_q_curr++;
 		tx_cb->oal = kmalloc(512, GFP_KERNEL);
 		if (tx_cb->oal == NULL)
-			return -1;
+			return -ENOMEM;
 	}
 	return 0;
 }