[PATCH1/2] Fix return value handling

Marek Vasut marek.vasut at gmail.com
Mon Mar 23 11:59:48 EDT 2009


On Monday 23 of March 2009 16:57:24 Marek Vasut wrote:
> Hi,
> here is a resend. One patch per mail.
sorry, inlining

From fd2e610a87a8372cbc513e336fa71e3438742c9d Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut at gmail.com>
Date: Mon, 23 Mar 2009 15:57:11 +0100
Subject: [PATCH 1/2] Firmware loading functions can return possitive values
 This is not a bug, but take it into consideration and handle it properly.

Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
---
 drivers/net/wireless/libertas/if_cs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/libertas/if_cs.c 
b/drivers/net/wireless/libertas/if_cs.c
index 842a08d..3f02e6a 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -867,9 +867,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
 
 	/* Load the firmware early, before calling into libertas.ko */
 	ret = if_cs_prog_helper(card);
-	if (ret == 0)
+	if (ret >= 0)
 		ret = if_cs_prog_real(card);
-	if (ret)
+	if (ret < 0)
 		goto out2;
 
 	/* Make this card known to the libertas driver */
-- 
1.6.2





More information about the libertas-dev mailing list