1
0
Fork 0
alistair23-linux/drivers/staging/emxx_udc
Alex Dewar 659da2df0c staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent()
[ Upstream commit cc34073c62 ]

In nbu2ss_eq_queue() memory is allocated with dma_alloc_coherent(),
though, strangely, NULL is passed as the struct device* argument. Pass
the UDC's device instead. Fix up the corresponding call to
dma_free_coherent() in the same way.

Build-tested on x86 only.

Fixes: 33aa8d45a4 ("staging: emxx_udc: Add Emma Mobile USB Gadget driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200825091928.55794-1-alex.dewar90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:37 +01:00
..
Kconfig staging: add missing SPDX lines to Kconfig files 2019-04-03 11:10:15 +02:00
Makefile staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
TODO staging: emxx_udc: Add GPIO descriptor work to TODO 2018-04-23 14:36:10 +02:00
emxx_udc.c staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent() 2020-10-29 09:57:37 +01:00
emxx_udc.h staging: emxx_udc: remove local TRUE/FALSE definition 2019-09-12 10:35:51 +01:00