mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-14 21:29:37 +02:00
dma-mapping: benchmark: avoid needless copy_to_user if benchmark fails
[ Upstream commit f7c9ccaadf
]
If do_map_benchmark() has failed, there is nothing useful to copy back
to userspace.
Suggested-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e6e1eda06b
commit
39d31edcf9
|
@ -256,6 +256,9 @@ static long map_benchmark_ioctl(struct file *file, unsigned int cmd,
|
||||||
* dma_mask changed by benchmark
|
* dma_mask changed by benchmark
|
||||||
*/
|
*/
|
||||||
dma_set_mask(map->dev, old_dma_mask);
|
dma_set_mask(map->dev, old_dma_mask);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user