target: Fix parameter list length checking in MODE SELECT
authorRoland Dreier <roland@purestorage.com>
Fri, 8 Feb 2013 23:18:40 +0000 (15:18 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Feb 2013 20:16:11 +0000 (12:16 -0800)
commit71f41fe1fafae2e407ef19d8174207f7ff80b387
treee780f1e3fcfec59f5ff3f876d8850843d52b442c
parentbb992e72f9b751fceb04afeb7736b6a3e50effcf
target: Fix parameter list length checking in MODE SELECT

An empty parameter list (length == 0) is not an error, so succeed MODE
SELECT in this case.  If the parameter list length is too small,
return the correct sense code of PARAMETER LIST LENGTH ERROR.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_spc.c