]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Always set output parameters in bnxt_get_max_rings().
authorMichael Chan <michael.chan@broadcom.com>
Mon, 9 Jul 2018 06:24:49 +0000 (02:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2018 23:27:14 +0000 (16:27 -0700)
commit43d54c6ca2ca63f3dabad436416bbc92f3493bcc
treefed185ef2a7033527110fc19708dd8781ccc0ed6
parentd633d357f2aac20e3d24179f52c02af89d959444
bnxt_en: Always set output parameters in bnxt_get_max_rings().

The current code returns -ENOMEM and does not bother to set the output
parameters to 0 when no rings are available.  Some callers, such as
bnxt_get_channels() will display garbage ring numbers when that happens.
Fix it by always setting the output parameters.

Fixes: c68e898cc259 ("bnxt_en: Modify bnxt_get_max_rings() to support shared or non shared rings.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c