]> git.hungrycats.org Git - linux/commit
enic: do not overwrite error code
authorGovindarajulu Varadarajan <gvaradar@cisco.com>
Mon, 18 Jun 2018 17:01:05 +0000 (10:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:45 +0000 (14:52 +0100)
commit1bee5f3d9530c5e4153c017190994b9a6b3144b7
treedb0cbe219dec0591d8eeafd4c2958480c4f749ea
parentb9627a218e2b2a42b812499ccb5d92707482d5d0
enic: do not overwrite error code

[ Upstream commit 56f772279a762984f6e9ebbf24a7c829faba5712 ]

In failure path, we overwrite err to what vnic_rq_disable() returns. In
case it returns 0, enic_open() returns success in case of error.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Fixes: e8588e268509 ("enic: enable rq before updating rq descriptors")
Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cisco/enic/enic_main.c