summaryrefslogtreecommitdiff
path: root/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2022-01-08 17:33:19 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-01-08 22:17:41 +0300
commitc579792562837ec2e64b006cfc9423e4177a4d26 (patch)
treea2ca8dd514c69b2157e6e92c81b73febddd6fa56 /drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
parent82192cb497f9eca6c0d44dbc173e68d59ea2f3c9 (diff)
downloadlinux-c579792562837ec2e64b006cfc9423e4177a4d26.tar.xz
can: janz-ican3: initialize dlc variable
Clang static analysis reports this problem janz-ican3.c:1311:2: warning: Undefined or garbage value returned to caller return dlc; ^~~~~~~~~~ dlc is only set with this conditional if (!(cf->can_id & CAN_RTR_FLAG)) dlc = cf->len; But is always returned. So initialize dlc to 0. Fixes: cc4b08c31b5c ("can: do not increase tx_bytes statistics for RTR frames") Link: https://lore.kernel.org/all/20220108143319.3986923-1-trix@redhat.com Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c')
0 files changed, 0 insertions, 0 deletions