]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: dcb: default to returning -EOPNOTSUPP
authorTom Rix <trix@redhat.com>
Sat, 26 Mar 2022 17:20:03 +0000 (10:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Mar 2022 18:46:44 +0000 (11:46 -0700)
commite6b2a7febe82617264565f0b13a3d2d2380f5886
treed001a89d59d8d60860870c365db1ab62428bda2a
parent469938367b948cf7a4b8269f920a15976cf8241c
qlcnic: dcb: default to returning -EOPNOTSUPP

Clang static analysis reports this issue
qlcnic_dcb.c:382:10: warning: Assigned value is
  garbage or undefined
  mbx_out = *val;
          ^ ~~~~

val is set in the qlcnic_dcb_query_hw_capability() wrapper.
If there is no query_hw_capability op in dcp, success is
returned without setting the val.

For this and similar wrappers, return -EOPNOTSUPP.

Fixes: 035af8c4bddf ("qlcnic: dcb: Query adapter DCB capabilities.")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h