qed: signedness bug in qed_dcbx_process_tlv()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 23 May 2016 10:19:35 +0000 (13:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 May 2016 22:11:08 +0000 (15:11 -0700)
"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>
drivers/net/ethernet/qlogic/qed/qed_dcbx.c

index cbf58e1f9333f6b29d4d626d777c16db6a8c4fed..a06d19a698b20e582f11677a675ee250e5b0307d 100644 (file)
@@ -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;