[PATCH 1/2] net/irda: sh_sir: fixup err return value on sh_sir_open

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kuninori Morimoto
Date: Monday, April 5, 2010 - 9:43 pm

On sh_sir_open function, there was a possibility that
err variable didn't have value even though it is return value.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/net/irda/sh_sir.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index d7c983d..761ed01 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -645,8 +645,10 @@ static int sh_sir_open(struct net_device *ndev)
 	sh_sir_set_baudrate(self, 9600);
 
 	self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME);
-	if (!self->irlap)
+	if (!self->irlap) {
+		err = -ENODEV;
 		goto open_err;
+	}
 
 	/*
 	 * Now enable the interrupt then start the queue
-- 
1.6.3.3

--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] net/irda: sh_sir: Bug fix patches, Kuninori Morimoto, (Mon Apr 5, 9:42 pm)
[PATCH 1/2] net/irda: sh_sir: fixup err return value on sh ..., Kuninori Morimoto, (Mon Apr 5, 9:43 pm)
[PATCH 2/2] net/irda: sh_sir: Modify iounmap wrong execution, Kuninori Morimoto, (Mon Apr 5, 9:43 pm)
Re: [PATCH 0/2] net/irda: sh_sir: Bug fix patches, David Miller, (Tue Apr 6, 7:52 pm)