net/ice/base: clear error status before set FC
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 15 Jun 2020 02:05:04 +0000 (10:05 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:08 +0000 (19:21 +0200)
commitf878b148653f774ab6655b2b3c91c2f7a517f898
treeedc045bc6bc1e14ec890ed8c2e1f91fd3bc322b4
parent79d4730481c69ed1f1b93ad5261b70347f03194d
net/ice/base: clear error status before set FC

ice_set_fc takes a u8 pointer 'aq_failures' as an input parameter. If
this function encounters an error, in addition to returning an
appropriate ice_status enum code, it also populates aq_failures with a
link specific error value.

If the caller does not initialize this variable to 0 before calling
ice_set_fc, it would appear as if ice_set_fc returned an error code in
this variable. So initialize it to 0.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_common.c