diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2010-04-05 14:43:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-06 22:50:20 -0400 |
commit | ba5d47cf4313e86afe046d402b8cfe7b2bca911d (patch) | |
tree | 1071b74daf19dc3bac30763214306fbb743254d7 /drivers/net/irda | |
parent | 842509b8591fd9a40f5532a5f049bd29804af6d6 (diff) |
net/irda: sh_sir: fixup err return value on sh_sir_open
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | 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 d7c983dc91ad..761ed012f0bb 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) | |||
645 | sh_sir_set_baudrate(self, 9600); | 645 | sh_sir_set_baudrate(self, 9600); |
646 | 646 | ||
647 | self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME); | 647 | self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME); |
648 | if (!self->irlap) | 648 | if (!self->irlap) { |
649 | err = -ENODEV; | ||
649 | goto open_err; | 650 | goto open_err; |
651 | } | ||
650 | 652 | ||
651 | /* | 653 | /* |
652 | * Now enable the interrupt then start the queue | 654 | * Now enable the interrupt then start the queue |