qlcnic: fix a return in qlcnic_dcb_get_capability()
commit78cfa6b418490ebfdeb12eadd8e623e45b54292e
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 Oct 2018 20:11:11 +0000 (19 23:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:25:50 +0000 (28 18:25 +0100)
tree2eed8684b0569e576e00fd2ccd0c73c8f5bd0d71
parent4c65f3274a55bbfea5639072fbc8a115c10116b7
qlcnic: fix a return in qlcnic_dcb_get_capability()

[ Upstream commit c94f026fb742b2d3199422751dbc4f6fc0e753d8 ]

These functions are supposed to return one on failure and zero on
success.  Returning a zero here could cause uninitialized variable
bugs in several of the callers.  For example:

    drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:1660 get_iscsi_dcb_priority()
    error: uninitialized symbol 'caps'.

Fixes: 48365e485275 ("qlcnic: dcb: Add support for CEE Netlink interface.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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.c