drivers: can: mcux: flexcan: add missing mutex unlock in error path
Add missing mutex unlock to error handling path in mcux_flexcan_add_rx_filter(). Fixes: #56284 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
c11e5d82ba
commit
4ec054aa45
1 changed files with 2 additions and 1 deletions
|
@ -515,7 +515,7 @@ static int mcux_flexcan_add_rx_filter(const struct device *dev,
|
|||
}
|
||||
|
||||
if (alloc == -ENOSPC) {
|
||||
return alloc;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
mcux_flexcan_can_filter_to_mbconfig(filter, &data->rx_cbs[alloc].mb_config,
|
||||
|
@ -544,6 +544,7 @@ static int mcux_flexcan_add_rx_filter(const struct device *dev,
|
|||
alloc = -ENOSPC;
|
||||
}
|
||||
|
||||
unlock:
|
||||
k_mutex_unlock(&data->rx_mutex);
|
||||
|
||||
return alloc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue