]> www.infradead.org Git - users/dwmw2/linux.git/commit
qlcnic: dcb: default to returning -EOPNOTSUPP
authorTom Rix <trix@redhat.com>
Sat, 26 Mar 2022 17:20:03 +0000 (10:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:29 +0000 (14:40 +0200)
commit4896c308a57d4f036af4b84ce6f61f97f5c5f23c
tree244b39818ae26b89eabccea727a914fc5e917e7a
parent2165d0ebfbacdda40483eaa8ec305b6e79d2a3b3
qlcnic: dcb: default to returning -EOPNOTSUPP

[ Upstream commit 1521db37f0d42334a88e8ff28198a27d1ed5cd7b ]

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: 14d385b99059 ("qlcnic: dcb: Query adapter DCB capabilities.")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h