diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index f882ffd7f..0360a7262 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2544,6 +2544,8 @@ static unsigned int scst_cm_get_lun(const struct scst_device *dev) } rcu_read_unlock(); + WARN_ON_ONCE(res == SCST_MAX_LUN); + out: TRACE_EXIT_RES(res); return res;