]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Feb 2018 15:24:08 +0000 (07:24 -0800)
committerKeith Busch <keith.busch@intel.com>
Thu, 22 Feb 2018 08:45:30 +0000 (01:45 -0700)
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>
drivers/nvme/host/fabrics.c

index 5dd4ceefed8fe0d0897aa8dadb1d266174b2eb02..a1c58e35075e9e180cae240d6951c807bb7a4a82 100644 (file)
@@ -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);