]> Git Repo - linux.git/commit
can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value
authorTom Rix <[email protected]>
Sat, 19 Mar 2022 15:31:28 +0000 (08:31 -0700)
committerMarc Kleine-Budde <[email protected]>
Thu, 31 Mar 2022 07:55:11 +0000 (09:55 +0200)
commitfa7b514d2b2894e052b8e94c7a29feb98e90093f
treeccdedcee43a974d222d946ae3992d8caba206802
parente382fea8ae54f5bb62869c6b69b33993d43adeca
can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value

Clang static analysis reports this issue:

| mcp251xfd-core.c:1813:7: warning: The left operand
|   of '&' is a garbage value
|   FIELD_GET(MCP251XFD_REG_DEVID_ID_MASK, dev_id),
|   ^                                      ~~~~~~

dev_id is set in a successful call to mcp251xfd_register_get_dev_id().
Though the status of calls made by mcp251xfd_register_get_dev_id() are
checked and handled, their status' are not returned. So return err.

Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Tom Rix <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
This page took 0.054817 seconds and 4 git commands to generate.