Skip to content
Commit 5f8a249c authored by Pavel Belous's avatar Pavel Belous Committed by Greg Kroah-Hartman
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 avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a819ba2
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