From: Kuninori Morimoto Date: Mon, 5 Apr 2010 18:43:09 +0000 (+0000) Subject: net/irda: sh_sir: fixup err return value on sh_sir_open X-Git-Tag: firefly_0821_release~9833^2~2087^2~561 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ba5d47cf4313e86afe046d402b8cfe7b2bca911d;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: David S. Miller --- 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) 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