Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1ca49463 authored by Alan Douglas's avatar Alan Douglas Committed by Max Filippov
Browse files

xtensa: fix address checks in dma_{alloc,free}_coherent



Virtual address is translated to the XCHAL_KSEG_CACHED region in the
dma_free_coherent, but is checked to be in the 0...XCHAL_KSEG_SIZE
range.

Change check for end of the range from 'addr >= X' to 'addr > X - 1' to
handle the case of X == 0.

Replace 'if (C) BUG();' construct with 'BUG_ON(C);'.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarAlan Douglas <adouglas@cadence.com>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent f61bf8e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment