Commit d7728216 authored by Frank de Brabander's avatar Frank de Brabander Committed by Greg Kroah-Hartman
Browse files

selftests: txring_overwrite: fix incorrect test of mmap() return value



[ Upstream commit cecaa76b ]

If mmap() fails it returns MAP_FAILED, which is defined as ((void *) -1).
The current if-statement incorrectly tests if *ring is NULL.

Fixes: 358be656 ("selftests/net: add txring_overwrite")
Signed-off-by: default avatarFrank de Brabander <debrabander@gmail.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cec7a0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment