diff options
author | Tom Rix <trix@redhat.com> | 2022-03-19 18:31:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:24:09 +0300 |
commit | be8ebbabac944f01f6fabb026df060ca84c69d3c (patch) | |
tree | ee77086437f2ab244042d96ecb9d6746774f9cdd /lib | |
parent | fa9c1f14002dc0d5293e16a2007bd89b6e79207b (diff) | |
download | linux-be8ebbabac944f01f6fabb026df060ca84c69d3c.tar.xz |
can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value
commit fa7b514d2b2894e052b8e94c7a29feb98e90093f 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: 55e5b97f003e ("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>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions