diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 0fbcd32f6..e30ddead7 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1586,7 +1586,7 @@ int scst_add_threads(struct scst_cmd_threads *cmd_threads, } TRACE_DBG("cmd_threads %p, dev %s, tgt_dev %p, num %d, n %d", - cmd_threads, dev->virt_name, tgt_dev, num, n); + cmd_threads, dev ? dev->virt_name : NULL, tgt_dev, num, n); if (tgt_dev != NULL) { struct scst_tgt_dev *t;