Skip to content

Commit fa7b514

Browse files
Tom Rixmarckleinebudde
authored andcommitted
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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ mcp251xfd_register_get_dev_id(const struct mcp251xfd_priv *priv, u32 *dev_id,
17861786
out_kfree_buf_rx:
17871787
kfree(buf_rx);
17881788

1789-
return 0;
1789+
return err;
17901790
}
17911791

17921792
#define MCP251XFD_QUIRK_ACTIVE(quirk) \

0 commit comments

Comments
 (0)