diff options
author | Thomas Fourier <fourier.thomas@gmail.com> | 2025-06-30 10:36:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 16:04:53 +0200 |
commit | 56aebaaa3adcc18e67ea9c2c8920c34efb6adf3c (patch) | |
tree | 60290e4ab3cd237e49efcc404cceff898ff2915c /net/sched/sch_api.c | |
parent | 446ac00b86be1670838e513b643933d78837d8db (diff) |
nui: Fix dma_mapping_error() check
[ Upstream commit 561aa0e22b70a5e7246b73d62a824b3aef3fc375 ]
dma_map_XXX() functions return values DMA_MAPPING_ERROR as error values
which is often ~0. The error value should be tested with
dma_mapping_error().
This patch creates a new function in niu_ops to test if the mapping
failed. The test is fixed in niu_rbr_add_page(), added in
niu_start_xmit() and the successfully mapped pages are unmaped upon error.
Fixes: ec2deec1f352 ("niu: Fix to check for dma mapping errors.")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/sched/sch_api.c')
0 files changed, 0 insertions, 0 deletions