Skip to content
Commit b19b4634 authored by Takashi Iwai's avatar Takashi Iwai Committed by David S. Miller
Browse files

hv/netvsc: Fix NULL dereference at single queue mode fallback



The recent commit 916c5e14 ("hv/netvsc: fix handling of fallback
to single queue mode") tried to fix the fallback behavior to a single
queue mode, but it changed the function to return zero incorrectly,
while the function should return an object pointer.  Eventually this
leads to a NULL dereference at the callers that expect non-NULL
value.

Fix it by returning the proper net_device object.

Fixes: 916c5e14 ("hv/netvsc: fix handling of fallback to single queue mode")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4597b62f
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