summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-02-22 07:24:08 -0800
committerKeith Busch <keith.busch@intel.com>2018-02-22 01:45:30 -0700
commit5a1e59533380a3fd04593e4ab2d4633ebf7745c1 (patch)
treeab461e66bee5611d0345314cbee27aeee0d7f8a4
parentaf27d9403f5b80685b79c88425086edccecaf711 (diff)
downloadlinux-stable-5a1e59533380a3fd04593e4ab2d4633ebf7745c1.tar.gz
linux-stable-5a1e59533380a3fd04593e4ab2d4633ebf7745c1.tar.bz2
linux-stable-5a1e59533380a3fd04593e4ab2d4633ebf7745c1.zip
nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
THIS_MODULE evaluates to NULL when used from code built into the kernel, thus breaking built-in transport modules. Remove the bogus check. Fixes: 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Keith Busch <keith.busch@intel.com>
-rw-r--r--drivers/nvme/host/fabrics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 5dd4ceefed8f..a1c58e35075e 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect);
*/
int nvmf_register_transport(struct nvmf_transport_ops *ops)
{
- if (!ops->create_ctrl || !ops->module)
+ if (!ops->create_ctrl)
return -EINVAL;
down_write(&nvmf_transports_rwsem);