From b1582547668d4b40a1307037a80853dd87dd3458 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 9 Jan 2015 12:23:25 +0000 Subject: [PATCH] scst_sysfs: return EINVAL on too big LUN Signed-off-by: Sebastian Herbszt git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5961 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index d4f781d1a..71be58f89 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1268,6 +1268,7 @@ static int __scst_process_luns_mgmt_store(char *buffer, goto out_unlock; } else if (virt_lun > SCST_MAX_LUN) { PRINT_ERROR("Too big LUN %ld (max %d)", virt_lun, SCST_MAX_LUN); + res = -EINVAL; goto out_unlock; }