target/iscsi: cleanup some allocation style issues
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Apr 2012 06:33:59 +0000 (09:33 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 6 May 2012 22:02:33 +0000 (15:02 -0700)
commit381e309a658feadb48c14566b3b26ccb7eec75a0
treebebfccfbb0353296a9b2d5c3f8e563341296d0e9
parentbfb79eac2026b411df9e253a9c350039b4b04bb7
target/iscsi: cleanup some allocation style issues

We can use kcalloc() here instead of kzalloc().  It's better style and
it has overflow checking built in.

Also -ENOMEM is the correct error code for allocation errors.  -1 means
-EPERM.  None of the callers preserve the error codes so it doesn't
matter except as a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_seq_pdu_list.c