]> git.baikalelectronics.ru Git - kernel.git/commit
net/sonic: use dma_mapping_error() for error check
authorZhang Changzhong <zhangchangzhong@huawei.com>
Tue, 21 Mar 2023 03:45:43 +0000 (14:45 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:38 +0000 (11:16 +0200)
commit042b07917629c696f52c58b5ccd1fc04e8ede0d2
tree4c5be155dcea5192193c4cef85a8f63e601b70d5
parent50cf5fec4feb93505bee70ea6300f31432326934
net/sonic: use dma_mapping_error() for error check

[ Upstream commit 4107b8746d93ace135b8c4da4f19bbae81db785f ]

The DMA address returned by dma_map_single() should be checked with
dma_mapping_error(). Fix it accordingly.

Fixes: 2f74b9d37dfb ("[PATCH] macsonic/jazzsonic network drivers update")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/6645a4b5c1e364312103f48b7b36783b94e197a2.1679370343.git.fthain@linux-m68k.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/natsemi/sonic.c