mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
[ Upstream commit 186615f885 ]
Number of MW LUTs depends on NTB configuration and can be set to zero,
in such scenario rounddown_pow_of_two will cause undefined behaviour and
should not be performed.
This patch ensures that rounddown_pow_of_two is called on valid value.
Signed-off-by: Maciej Grochowski <Maciej.Grochowski@sony.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0e93042094
commit
2e4d5e8d86
1 changed files with 4 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue