diff options
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r-- | drivers/nvme/target/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index e0b3f0166722..8a891ca53367 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -895,7 +895,7 @@ struct nvmet_subsys *nvmet_subsys_alloc(const char *subsysnqn, subsys->type = type; subsys->subsysnqn = kstrndup(subsysnqn, NVMF_NQN_SIZE, GFP_KERNEL); - if (IS_ERR(subsys->subsysnqn)) { + if (!subsys->subsysnqn) { kfree(subsys); return NULL; } |