]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().
authorMichael Chan <michael.chan@broadcom.com>
Fri, 26 Apr 2019 02:31:55 +0000 (22:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2019 21:00:19 +0000 (17:00 -0400)
commitcb34903cab70794a52ba2ac5a6e11e512c87deb8
treea43edc4c1f99d667eae050f1deefdd555e9adc27
parentb1a4d2d178745e61888b77a08276eed0a3e16ec9
bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().

In bnxt_rx_pkt(), if the driver encounters BD errors, it will recycle
the buffers and jump to the end where the uninitailized variable "len"
is referenced.  Fix it by adding a new jump label that will skip
the length update.  This is the most correct fix since the length
may not be valid when we get this type of error.

Fixes: 2d6e8c69a5b3 ("bnxt_en: add support for software dynamic interrupt moderation")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c