Skip to content
Commit dcb974a9 authored by François Baldassari's avatar François Baldassari Committed by Anas Nashif
Browse files

Can: mcan: Uninitialized access in state_change_handler



Found via static analysis. In `can_mcan_state_change_handler`, the
return value of `can_mcan_get_state` is not checked for error. In the
event of an error, both `err_cnt` and `state` are left unitialized and
accessed downstream.

The correct behavior is to return early in that case.

Signed-off-by: default avatarFrançois Baldassari <francois@memfault.com>
parent fe13209e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment