Merge tag 'pinctrl-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6-microblaze.git] / drivers / nvme / target / fc.c
index e6861cc..cd4e73a 100644 (file)
@@ -1019,7 +1019,7 @@ static void
 nvmet_fc_free_hostport(struct nvmet_fc_hostport *hostport)
 {
        /* if LLDD not implemented, leave as NULL */
-       if (!hostport->hosthandle)
+       if (!hostport || !hostport->hosthandle)
                return;
 
        nvmet_fc_hostport_put(hostport);