mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
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>
This commit is contained in:
parent
842509b859
commit
ba5d47cf43
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user