summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-23 12:19:35 +0200
committerDavid S. Miller <davem@davemloft.net>2016-05-24 00:11:08 +0200
commit54b9430f04b0be3beb7f2711152c61e7d39c58e5 (patch)
tree86519aa4d084e4f96d06a1bc8a669f22c7a1b6a3 /drivers
parentbpf, inode: disallow userns mounts (diff)
downloadlinux-54b9430f04b0be3beb7f2711152c61e7d39c58e5.tar.xz
linux-54b9430f04b0be3beb7f2711152c61e7d39c58e5.zip
qed: signedness bug in qed_dcbx_process_tlv()
"priority" needs to be signed for the error handling to work. Fixes: 39651abd2814 ('qed: add support for dcbx.') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_dcbx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index cbf58e1f9333..a06d19a698b2 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -192,9 +192,10 @@ qed_dcbx_process_tlv(struct qed_hwfn *p_hwfn,
struct dcbx_app_priority_entry *p_tbl,
u32 pri_tc_tbl, int count, bool dcbx_enabled)
{
- u8 tc, priority, priority_map;
+ u8 tc, priority_map;
enum dcbx_protocol_type type;
u16 protocol_id;
+ int priority;
bool enable;
int i;