Skip to content

Commit

Permalink
net/irda: sh_sir: fixup err return value on sh_sir_open
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and David S. Miller committed Apr 7, 2010
1 parent 842509b commit ba5d47c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/irda/sh_sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba5d47c

Please sign in to comment.