Skip to content
Commit 7d815f4a authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Wei Liu
Browse files

PCI: hv: Add check for hyperv_initialized in init_hv_pci_drv()



Add check for hv_is_hyperv_initialized() at the top of
init_hv_pci_drv(), so if the pci-hyperv driver is force-loaded on non
Hyper-V platforms, the init_hv_pci_drv() will exit immediately, without
any side effects, like assignments to hvpci_block_ops, etc.

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reported-and-tested-by: default avatarMohammad Alqayeem <mohammad.alqyeem@nutanix.com>
Reviewed-by: default avatarWei Liu <wei.liu@kernel.org>
Link: https://lore.kernel.org/r/1621984653-1210-1-git-send-email-haiyangz@microsoft.com
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent a4d7e8ae
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