Commit fa7b514
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: 55e5b97 ("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]>1 parent e382fea commit fa7b514
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1786 | 1786 | | |
1787 | 1787 | | |
1788 | 1788 | | |
1789 | | - | |
| 1789 | + | |
1790 | 1790 | | |
1791 | 1791 | | |
1792 | 1792 | | |
| |||
0 commit comments