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: 48365e4852
("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>
This commit is contained in:
parent
4c65f3274a
commit
78cfa6b418
1 changed files with 1 additions and 1 deletions
|
@ -883,7 +883,7 @@ static u8 qlcnic_dcb_get_capability(struct net_device *netdev, int capid,
|
|||
struct qlcnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (!test_bit(QLCNIC_DCB_STATE, &adapter->dcb->state))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
switch (capid) {
|
||||
case DCB_CAP_ATTR_PG:
|
||||
|
|
Loading…
Add table
Reference in a new issue