diff options
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/dmabounce.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 5b7c26395b44..028bdc9228fb 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -179,17 +179,19 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, | |||
179 | static inline struct safe_buffer * | 179 | static inline struct safe_buffer * |
180 | find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) | 180 | find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) |
181 | { | 181 | { |
182 | struct safe_buffer *b = NULL; | 182 | struct safe_buffer *b, *rb = NULL; |
183 | unsigned long flags; | 183 | unsigned long flags; |
184 | 184 | ||
185 | read_lock_irqsave(&device_info->lock, flags); | 185 | read_lock_irqsave(&device_info->lock, flags); |
186 | 186 | ||
187 | list_for_each_entry(b, &device_info->safe_buffers, node) | 187 | list_for_each_entry(b, &device_info->safe_buffers, node) |
188 | if (b->safe_dma_addr == safe_dma_addr) | 188 | if (b->safe_dma_addr == safe_dma_addr) { |
189 | rb = b; | ||
189 | break; | 190 | break; |
191 | } | ||
190 | 192 | ||
191 | read_unlock_irqrestore(&device_info->lock, flags); | 193 | read_unlock_irqrestore(&device_info->lock, flags); |
192 | return b; | 194 | return rb; |
193 | } | 195 | } |
194 | 196 | ||
195 | static inline void | 197 | static inline void |