enic: do not overwrite error code
authorGovindarajulu Varadarajan <gvaradar@cisco.com>
Mon, 18 Jun 2018 17:01:05 +0000 (10:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jun 2018 23:10:13 +0000 (08:10 +0900)
commit56f772279a762984f6e9ebbf24a7c829faba5712
treef9a2fc742b0482d6acbb7828e1b8b8ec6dd7cf29
parent8c43bd1706885ba1acfa88da02bc60a2ec16f68c
enic: do not overwrite error code

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>
drivers/net/ethernet/cisco/enic/enic_main.c