net: 3com: typhoon: typhoon_init_one: fix incorrect return values
authorThomas Preisner <thomas.preisner+linux@fau.de>
Fri, 30 Dec 2016 02:37:53 +0000 (03:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:11 +0000 (08:39 +0000)
commitc46e90ba86eae229735f9a0ea2985acab03f3558
tree8ffc5dc60f457618c4355710d539f6d4740bccda
parent03b497ebfdf31f54043e5d56959dbbef46c94503
net: 3com: typhoon: typhoon_init_one: fix incorrect return values

[ Upstream commit 107fded7bf616ad6f46823d98b8ed6405d7adf2d ]

In a few cases the err-variable is not set to a negative error code if a
function call in typhoon_init_one() fails and thus 0 is returned
instead.
It may be better to set err to the appropriate negative error
code before returning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188841

Reported-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Thomas Preisner <thomas.preisner+linux@fau.de>
Signed-off-by: Milan Stephan <milan.stephan+linux@fau.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/3com/typhoon.c