[SCSI] Fix printing of failed 32-byte commands
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / constants.c
index 7092ff67ecd39fdef1d932887e8c568494430c4f..cd05e049d5f6ad7164c6485ee336db00933c63b0 100644 (file)
@@ -346,6 +346,9 @@ void scsi_print_command(struct scsi_cmnd *cmd)
 {
        int k;
 
+       if (cmd->cmnd == NULL)
+               return;
+
        scmd_printk(KERN_INFO, cmd, "CDB: ");
        print_opcode_name(cmd->cmnd, cmd->cmd_len);