Alan Douglas 1ca49463c4 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: Alan Douglas <adouglas@cadence.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:14 +04:00
..
2013-02-23 19:35:57 -08:00
2014-01-14 10:19:59 -08:00
2014-01-14 10:19:58 -08:00
2014-01-14 10:19:58 -08:00
2013-04-08 17:39:29 +02:00
2013-02-23 19:35:57 -08:00
2013-02-23 19:12:53 -08:00
2014-01-19 20:00:48 +04:00
2014-01-14 10:19:59 -08:00