WSL2-Linux-Kernel/drivers/net/can/spi/mcp251xfd
Tom Rix be8ebbabac can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value
commit fa7b514d2b upstream.

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: 55e5b97f00 ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
Link: https://lore.kernel.org/all/20220319153128.2164120-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:24:09 +02:00
..
Kconfig can: mcp251xfd: add dev coredump support 2021-03-30 11:14:49 +02:00
Makefile can: mcp251xfd: add HW timestamp infrastructure 2021-03-30 11:14:50 +02:00
mcp251xfd-core.c can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value 2022-04-08 14:24:09 +02:00
mcp251xfd-crc16.c can: mcp251xfd: rename all remaining occurrence to mcp251xfd 2020-09-30 21:55:28 +02:00
mcp251xfd-dump.c can: mcp251xfd: add dev coredump support 2021-03-30 11:14:49 +02:00
mcp251xfd-dump.h can: mcp251xfd: add dev coredump support 2021-03-30 11:14:49 +02:00
mcp251xfd-regmap.c can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register 2021-04-07 09:31:28 +02:00
mcp251xfd-timestamp.c can: mcp251xfd: mark some instances of struct mcp251xfd_priv as const 2021-08-19 15:07:03 +02:00
mcp251xfd.h can: mcp251xfd: mark some instances of struct mcp251xfd_priv as const 2021-08-19 15:07:03 +02:00