diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 9dfb3d95c..66a38eea4 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) } } + WARN_ON_ONCE(res == SCST_MAX_LUN); + out: TRACE_EXIT_RES(res); return res;