Skip to content
Commit 0c70a765 authored by Pavel Belous's avatar Pavel Belous Committed by Paul Gortmaker
Browse files

net: atlantic: fix potential error handling

commit 380ec5b9 upstream.

Code inspection found that in case of mapping error we do return current
'ret' value. But beside error, it is used to count number of descriptors
allocated for the packet. In that case map_skb function could return '1'.

Changing it to return zero (number of mapped descriptors for skb)

Fixes: 018423e9

 ("net: ethernet: aquantia: Add ring support code")
Signed-off-by: default avatarPavel Belous <pbelous@marvell.com>
Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 9adf0cfc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment